+ 2
why 20 ?
def apply_twice(func, arg): return func(func(arg)) def add_five(x): return x + 5 print(apply_twice(add_five, 10)) set to me the process, pls
3 Answers
+ 5
print(apply_twice(add_five,10))= add_five(add_five(10))=add_five(15)=20
+ 3
Mitch Check here how we can pass function as parameter and how it works.
https://code.sololearn.com/cgfonDJu8pH0/?ref=app
+ 2
đđ˘đ˘đđ¨ đđĄđđ˛đđĽ, i thank you cause you helped me to solve this code.