Question 3: In and Out

Draw the environment diagram of the following code:

x = 3
def out(g, m):
    x = 5 * m
    def inner():
        return x
    if m == 0:
        return g
    else:
        return out(inner, m-1)
v = out(out, 1)()

After drawing the diagram, compare it to the correct one here. Then predict what would python display and submit your answer with python ok -q q3 -u.