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

Q&A Discussions

What happens if I assign a variable x to 8, and Y to x, can i later change what value x holds? Or is Y forced to be equal to 8?
rubyvariables
2 Votes
4 Answers
2nd Jun 2017, 9:40 AM
william
static int Pow(int x, int y = 2) { int result = 1; for (int i = 0; i < y; i++) /* this is the for loop that I don't understand.
c#methods
1 Vote
4 Answers
22nd Jan 2017, 5:13 PM
Steven Bennett
Steven Bennett - 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
< Previous12Next >
Hot today
Can I import any module in python in this app?
1 Votes
Loops and conditions
2 Votes
Algorithm to create maze-like grid
2 Votes
photo upload issue in html code
0 Votes
app for lessons
1 Votes
Any coding competitions?
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
Rise of AI
1 Votes
Need a personal tutor
0 Votes
Community and feed option
0 Votes