Before you start writing your own code, you'll use the the online Python 3 tutor to trace the execution of recursive functions. Try to predict what will happen before stepping through the code in the tutor.
def mystery(x): if x == 0: return 0 return (x % 10) + mystery(x // 10) def main(): a = mystery(46213) main()
def mystery2(L, i): if len(L) <= i: return 0 return L[i] + mystery2(L, i + 1) def mystery1(L): return mystery2(L, 0) def main(): a = mystery1([4, 10, 1, 3]) main()