Program output with nested function and function parameter
Advertisements Given the following code def alpha(num, proc): def beta(): print(num) if num == 1: alpha(2, beta) else: proc() def gamma(): pass alpha(1, gamma) I expected the output to be 2, since my logic was: alpha(1, gamma) => alpha(2, beta) # since num == 1 => proc() # since num != 1 => beta() =>… Read More Program output with nested function and function parameter