logo
Published on Models of Motion (http://www2.evergreen.edu/modelsofmotion)

Function Output Practice

def first(a):
    print "in first",a,b,c
    d = junk(b,a)
    print "return",d
    print "after junk",a,b,c
    return d

def junk(b,x):
    a=3
    print x
    print "in junk",a,b,c
    return x+1

a=5
c=7
b=2
print"start",a,b,c
c=first(b)
print "between calls"
b=junk(c,a)
print "done",a,b,c


Source URL:
http://www2.evergreen.edu/modelsofmotion/modelsofmotion/function-output-practice