• Corsi
  • Compilatore di codice
  • Discuti
  • Prezzi
  • Squadre
Menu

Discussioni Q&A

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 Voto
6 Risposte
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 Voto
2 Risposte
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 Voto
4 Risposte
21st Aug 2016, 4:57 AM
anju
How does return function work in python?
+defadd(x,do_twice(func,returnreturnxx,y):y):ydef
1 Voto
2 Risposte
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 Voti
2 Risposte
29th Jul 2016, 7:22 PM
Rupam Das
Rupam Das - avatar
Popolare oggi
Text editor
0 Votes
Debugging issue?
0 Votes
Which one should I start with to learn python. The developer path or both seperate beginner and intermediate python?
0 Votes
Is anyone else having this issue?
2 Votes
how to view only application
0 Votes
I’m really confused
0 Votes
Stream
0 Votes
Scraping
0 Votes
Why do I suck at C# it‘s Hard but i know C# is Hard but tooooo much😭
0 Votes
Subscription
0 Votes