+ 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
5 Antworten
+ 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.