Functional Programming | Sololearn: Learn to code for FREE!

+2

Functional Programming

def apply_twice(func, arg): return func(func(arg)) def take_three(func,arg): return func(func(arg)) def subtract_three(y): return y - 3 def add_five(x): return x + 5 print(take_three(subtract_three((apply_twice(add_five, 10))) I want to subtract 3 twice from the value 20 that results from the apply_twice function. I am getting an EOF error. HELP!!

1/30/2020 8:56:54 PM

Wi$e Xhi8F

2 Answers

New Answer

+4

calm down simply a bracket before apply too much🤓 and one too less at end.

+4

Wi$e Xhi8F Please link your prog next time by applying "insert" on your post.