A
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
def calculate():
global count
for i in (1, 2, 3, 4):
count += 1
calculate()
print count
- Correct Answer - Option(C)
- Views: 30
- Filed under category Python
- Hashtags:
Discusssion
Login to discuss.