• Cours
  • Compilateur de code
  • Discuter
  • Tarification
  • Équipes
Menu

Discussions Q&R

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 Réponses
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 Réponses
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 Réponses
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 Réponses
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 Vote
2 Réponses
29th Jul 2016, 7:22 PM
Rupam Das
Rupam Das - avatar
Aujourd'hui en vedette
Need a personal tutor
1 Votes
I can't figure out how to use the getElementById code in JavaScript Code Playground, I've tried multiple times and watched YT
0 Votes
Fix code
0 Votes
..
1 Votes
How can I turn my .py files to .exe files?
1 Votes
Software to write and run codes
1 Votes
How Much RAM is Required for Object Detection Project
0 Votes
Add lua
0 Votes
How to learn C++ and how long does it take
1 Votes
Summary please??
0 Votes