Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Jordan Lowrance

Problem 1:
def f ​ unky(f,a):
​def ​g(x):
​return ​f(a*x)
​return ​g

Problem 2:
def c ​ ompose(f,g):
​def ​function(x):
​return ​g(f(x))
​return ​function

Problem 3:
def p ​ ower(x, n):
​if ​n == ​0​:
​return ​1
​elif ​n < ​0​:
​return ​1​/power(x,-n)
​else​:
​return ​x * power(x,n-​1​)

You might also like