Trace each of the following Python functions and associated calls. Please find picture attached.
Picture below has the actual code that needs to be hand traced. Also please be as detailed as possible.
Thank you for your time!
2. Trace each of the following Python functions and associated calls. Following
the trace examples in your text, keep track of the memory and output.
def nonsensical(num):
if num> 1 :
print (“Num is: “, num)
nonsensical (num – 1)
print (“After the recursive call”)
else:
print (“This is the base case and Num is: “, num)
nonsensical(4)
a.
def silly(value) :
if value — 10 :
print (“done”)
return -5
else:
print (“not done”)
return -3. silly (value + 2)
print (“start”, “final: “, silly (4)
b.