What will be the output of the following Python code?
x = 5 def f1(): global x x = 4 def f2(a,b): global x return a+b+x f1() total = f2(1,2) print(total)
x=100 def f1(): global x x=90 def f2(): global x x=80 print(x)
Read the following Python code carefully and point out the global variables?
y, z = 1, 2 def f(): global x x = y+z
x=1 def cg(): global x x=x+1 cg() x
a=10 globals()['a']=25 print(a)
def f(): x=4 x=1 f() x