Question: Answer the following 2 questions. Please answer it all clearly and show all work/explanations. Also for the parts that require the code, make it such
Answer the following 2 questions. Please answer it all clearly and show all work/explanations. Also for the parts that require the code, make it such that i can copy paste the code. Make sure all work is legible.

(2 points) 1. (a) Determine the printed output for the call rec1(3). def reci(n): print(n, end='') if n == 1: print() elif n % 2 == 0: rec1(n // 2) else: rec1(3 * n + 13) (b) Explain what the function does. (3 points) 2. (a) Determine the returned value for the call rec2(252) as well as the returned values for all intermediate calls. (3 points) def rec2(n): if n % 2 == 1: return n else: return rec2 (n // 2) (b) Explain what the function does and what the purpose of the function is. (5 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
