Question: 4. Consider the following Python program: 1: def H(a): b = 7 ba 2: 3: WN 4: def G(a): 5: 35 6: 789 global
4. Consider the following Python program: 1: def H(a): b = 7 ba 2: 3: WN 4: def G(a): 5: 35 6: 789 global b b + a 7: def F (c): 8: 9: global b b = c 10: b = 10 11: F (7) 12: G (-20) 13: H (20) 14: print b (a) Using the line numbers specified, list the order in which the statements are executed. (b) What is the value of the variable b after executing line 11? (c) What is the value of the variable b after executing line 12? (d) What is the output generated by the program? (e) List the formal parameters in the program above. (f) List the actual parameters in the program above.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
