Question: 6. Scope (4 points). What is the output when the following code is executed? def foo (x, y): X = y* 2 y = x

6. Scope (4 points). What is the output when the following code is executed? def foo (x, y): X = y* 2 y = x + 1 z = x - y return z def main (): x = 20 = 10 z = 5 foo (x, y) print (x) print (y) print (z) print (ans) ans I main()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
