Lists, conditionals, multiple returns, optional parameters,
are all allowed-everything we did up and including this
week. (First person up, try putting several functions in a
list as a problem.)
Also, be sure you run your code and it does what you
think it does.
Here is an example problem.
What is printed?
def func_B(x,y):
return y-x
def func_A(x,y):
if x > y:
return y
else:
return func_B(y,x)
x=3
y=4
z=func_A(x,y)
print(z)