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

Q&A Discussions

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_twice(add, a, b))
functionspythonreturn
1 Vote
6 Answers
29th Jul 2016, 10:31 AM
Rupam Das
Rupam Das - avatar
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_
funcionea
1 Vote
2 Answers
23rd Apr 2019, 6:42 PM
Wander Anime
Wander Anime - avatar
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_twice(add, a, b)) anybody can explain what is the relevance of func in this code?
functionspython
1 Vote
4 Answers
21st Aug 2016, 4:57 AM
anju
How does return function work in python?
+defadd(x,do_twice(func,returnreturnxx,y):y):ydef
1 Vote
2 Answers
25th Aug 2020, 10:05 AM
Shakibur Rahaman
Shakibur Rahaman - avatar
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_twice(add, a, b)) Please explain step by step Which is caller here? Explain the 3rd and 4th line ? why in 4th line we write add(add(x,y),add(x,y)) which is function of 1st line ? how can we write function after return statement insted of (x+y+x+y )=30?
python
0 Votes
2 Answers
29th Jul 2016, 7:22 PM
Rupam Das
Rupam Das - avatar
Hot today
Python intermediate help with dictionaries
0 Votes
I'm about to make a complex calculator in python
0 Votes
Marquee
1 Votes
Any Advise?
1 Votes
why is python community is too small in sololearn?
0 Votes
How far do courses go on Sololearn?
0 Votes
Popsacles Aufgabe
1 Votes
Button In C++
1 Votes
C#
0 Votes
Audio adding
1 Votes