πŸ“Š Python
Q. What is the output of the following code?
Code:
count = 1 
  
def calculate(): 
    global count 
    for i in (1, 2, 3, 4):  
        count += 1
  
calculate() 
print count
  • (A) 1
  • (B) 4
  • (C) 5
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) 5

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
191
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Tanmay
Publisher
πŸ“ˆ
86%
Success Rate