Question: 7. What would be the output below? The Python code is using static-scoping. (5 pts Note: pay attention to the indentations. The vertical bar is
7. What would be the output below? The Python code is using static-scoping. (5 pts Note: pay attention to the indentations. The vertical bar is here to help you identify the indentations. y-o def first(: global x global y y- 22 printix, y def second) def third0 nonlocal x X-10 -20 printfx, y) first0) print(x, y) global y 100 y 200 print(x, y) third) print(x, ) def zerol): global x global y x=1 y- 2 print(x, ) first() rintix, y second() print(x y zero()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
