(c) X = 50 def func(x): print('x is', x) x = 2 print('Changed local x to', x) func(x) print('x is now',x
Answers
Answered by
5
Answer:
EXPLANATION: The global statement is used to declare that x is a global variable – hence, when we assign a value to x inside the function, that change is reflected when we use the value of x in the main block.
Similar questions
Math,
3 hours ago
Math,
3 hours ago
Social Sciences,
3 hours ago
English,
5 hours ago
Social Sciences,
5 hours ago
English,
8 months ago
Math,
8 months ago