Question: Hello. I have a pseudocode. Can you convert this code to PYTHON ? My code y=1 def sub1() y=2 def sub2() nonlocal y y=3 print(inner
Hello. I have a pseudocode. Can you convert this code to PYTHON ?
My code
y=1 def sub1() y=2 def sub2() nonlocal y y=3 print("inner value", y) sub2() print("outer value", y) sub1() print("global value:", y)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
