1.

What is the output of the below program? x = 50 def func(): global x print('x is', x) x = 2 print('Changed global x to', x) func() print('Value of x is', x)

A. x is 50 Changed global x to 2 Value of x is 50
B. x is 50 Changed global x to 2 Value of x is 2
C. x is 50 Changed global x to 50 Value of x is 50
D. None of the mentioned
Answer» C. x is 50 Changed global x to 50 Value of x is 50


Discussion

No Comment Found