+ 1

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_

No entiendo muy bien como se manejan

23rd Apr 2019, 6:42 PM
Wander Anime
Wander Anime - avatar
2 Answers
0
Tienes dos funciones: 1. add - devuelve la suma de x, y; 2. do_twice - devuelve una funciĂłn con dos parĂĄmetros (x, y). Total: 1. add(a,b) = 15; 2. do_twice(add,a,b) => => add(add(a,b), add(a,b)) = = add(15, 15) = 30;
23rd Apr 2019, 9:06 PM
Solo
Solo - avatar
0
Hi vasiliy .great job, but am just starter long way to go right
23rd Apr 2019, 10:40 PM
Sharon
Sharon - avatar