0

explication ?.

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))

22nd Mar 2020, 12:18 PM
MOURAD SAMHOUN
MOURAD SAMHOUN - avatar
2 Answers
+ 2
add(add(5,10),add(5,10)) # add(5, 10) is 15 add(15 , 15) # ouput: 30
22nd Mar 2020, 12:48 PM
Cmurio
Cmurio - avatar
0
The result is 30 add(add(5,10),add(5,10))
22nd Mar 2020, 12:34 PM
Muhammad Galhoum
Muhammad Galhoum - avatar