• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
0

python

How this code works please ? def apply_twice(func, arg): return func(func(arg)) def add_five(x): return x + 5 print(apply_twice(add_five, 10))

returndef5xadd_five(x):apply_twice(funcarg):func(func(arg))funcdef
21st Nov 2017, 6:02 PM
ilham
ilham - avatar
1 Answer

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
Pawed by JAVA đŸ˜‘đŸ˜‘đŸ˜‘đŸ’»do think it's good to learn know or not
1 Votes
Help me😭😭😭😭😭
0 Votes
Python for beginners
0 Votes
What is html
1 Votes
Hi guys someone to help write code to which I'll use to hack a WiFi
0 Votes
dictionary
0 Votes
Python
0 Votes
How its output is 2 but not 3
0 Votes
Audio trouble
0 Votes
Threads
0 Votes