def happy()def sing(person)def main()print("happy birthday to you!"happy(sing("fred"person "fredhappy(print(print("happy birthdaydear"person "sing("lucy"happy(person"fredfigure snapshot of completed call to happy function the body of happy consists of single print this statement is executedand then control returns to where it left off in sing figure shows snapshot of the execution so far execution continues in this manner with python making two more side trips back to happy to complete the execution of sing when python gets to the end of singcontrol then returns to main and continues immediately after the function call figure shows where we are at that point notice that the person variable in sing has disappeared the memory occupied by local function variables is reclaimed when the function finishes local variables do not retain any values from one function execution to the next def main()sing("fred"print(sing("lucy"def sing(person)happy(happy(print("happy birthdaydear"person "happy(figure snapshot of completed call to sing the next statement to execute is the bare print statement in main this produces blank line in the output then python encounters another call to sing as beforecontrol transfers to the function definition this time the formal parameter is "lucyfigure shows the situation as sing begins to execute for the second time def sing(person)def main()happy(sing("fred"yhappy( print( print("happy birthdaydear"person "sing("lucy"person happy(person"lucyfigure snapshot of second call to sing now we'll fast forward to the end the function body of sing is executed for lucy (with three side trips through happyand control returns to main just after the point of the function call now we have reached the bottom of our code fragmentas illustrated by figure these three