What will be the correct output of the following Python code?
a = 1
def f():
print (a+2)
def g():
a = 2
print (a+1)
def h():
global a
a = 3
print (a+3)
print (a+4)
f()
print (a+2)
g()
print (a+1)
h()
print (a+2)
Correct Answer:
5
3
3
3
2
6
5
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Python MCQ Questions