0
Can anybody explain this?
def add(x, y): return x + y def do_twice(func, x, y): return func(func(x, y), func(x, y)) a = 5 b = 10 print(do_twice(add, a, b))
1 Resposta
+ 2
1) the first function takes two numbers and return their sum.
2) the second function takes three argument, the first is a function and the other two are numbers.
What follows is this...
Add(add(5,10) , add(5,10))
Add(15, 15)
30
Hope you get this