Environment Diagrams: Conceptual

Writing out environment diagrams

For each of the following functions, write out the environment diagrams.

def adder(num):
    x = num
    x = x + 1
    return x + num
adder(4)

def adder(num):
#Assume same definition as above

def loop(m, n):
    while m < n:
        m = adder(m)
    return m
loop(1, 8)

def adder(num):
#Assume same definition as above

def loop(m, n):
#Assume same definition as above

def practice_makes_perfect(x, y, z):
    min_val = min(x, y, z)
    max_val = max(x, y, z)
    loop(min_val, max_val)
practice_makes_perfect(2, 6, 10)