Question: PO) 2. (20pt) Consider the two Python programs below: def A(I, P): def A(I, P): def BO): def B): print (I) print(I) if I >
PO) 2. (20pt) Consider the two Python programs below: def A(I, P): def A(I, P): def BO): def B): print (I) print(I) if I > 3: if I > 3: elif I > 2: elif I > 2: A(4, B) A(4, P) elif I > 1: elif I > 1: A(3, B) A(3, P) else: else: A(2, B) A(2, B) def CO): def CO: pass pass A(1, C) A(1, C) (1) (pt) Find the differences between the two programs. (2) (1pt) Find the output of each program. (3) (18pt) Explain the difference. (Python is using static scoping and dynamic binding.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
