πŸ“Š Python
Q. What will be the output of the following code snippet?
Code:
a = [1, 2, 3, 4, 5]
sum = 0
for ele in a:
   sum += ele 
print(sum)
  • (A) 15
  • (B) 0
  • (C) 20
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (A) 15

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
352
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Akash Lawaniya
Publisher
πŸ“ˆ
93%
Success Rate