QUESTION 14 What is the output of this 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) x is 50 Changed global x to 2...


14. Please help me answer this engineering question


QUESTION 14<br>What is the output of this program?<br>X = 50<br>def func ():<br>global x<br>print('x is', x)<br>X = 2<br>print('Changed global x to', x)<br>func ()<br>print ('Value of x is', x)<br>x is 50<br>Changed global x to 2<br>Value of x is 50<br>X is 50<br>Changed global x to 2<br>Value of x is 2<br>x is 50<br>Changed global x to 50<br>Value of x is 50<br>None of the above<br>

Extracted text: QUESTION 14 What is the output of this 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) x is 50 Changed global x to 2 Value of x is 50 X is 50 Changed global x to 2 Value of x is 2 x is 50 Changed global x to 50 Value of x is 50 None of the above

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here