# Q11 def lambda_curry2(func): """ Returns a Curried version of a two argument function func. >>> from operator import add >>> x = lambda_curry2(add) >>> y = x(3) >>> y(5) 8 """ "*** YOUR CODE HERE ***" return ______ # Q12 def funception(func_a, start): """ Takes in a function (function A) and a start value. Returns a function (function B) that will find the product of function A applied to the range of numbers from start (inclusive) to stop (exclusive) >>> def func_a(num): ... return num + 1 >>> func_b1 = funception(func_a, 3) >>> func_b1(2) 4 >>> func_b2 = funception(func_a, -2) >>> func_b2(-3) >>> func_b3 = funception(func_a, -1) >>> func_b3(4) >>> func_b4 = funception(func_a, 0) >>> func_b4(3) 6 >>> func_b5 = funception(func_a, 1) >>> func_b5(4) 24 """ "*** YOUR CODE HERE ***" # Q13 def cycle(f1, f2, f3): """ Returns a function that is itself a higher order function >>> def add1(x): ... return x + 1 >>> def times2(x): ... return x * 2 >>> def add3(x): ... return x + 3 >>> my_cycle = cycle(add1, times2, add3) >>> identity = my_cycle(0) >>> identity(5) 5 >>> add_one_then_double = my_cycle(2) >>> add_one_then_double(1) 4 >>> do_all_functions = my_cycle(3) >>> do_all_functions(2) 9 >>> do_more_than_a_cycle = my_cycle(4) >>> do_more_than_a_cycle(2) 10 >>> do_two_cycles = my_cycle(6) >>> do_two_cycles(1) 19 """ "*** YOUR CODE HERE ***"