+ 1
After using Return statement it won't execute any of the below statement right!!
When I removed the line below the return statement, it got executed but it says at top if page it's written that after using Return the below any statement won't execute
24 Respostas
- 1
return don't print values. you have to pass value function returning to use it later like
https://code.sololearn.com/cr0Z9iO61MkY/?ref=app
+ 1
Really!!
+ 1
I guess he mean you sounds completely random.
Please attach your code here so people will help you
+ 1
*attach
+ 1
Yes above code executes even after using Return statement and another problem is, at last so I have to use print(add_numbers (2,3)), why can't I use only , add_numbers(2, 3)
+ 1
Ty man
0
Wait
0
How the heck I'll attack the code.... Even though I saved it isn't showing
0
program is working totally fine and what you have learned is also totally correct. what actually happening is :
in first part when ur using def it's defining function add_numbers
when you call it in print statement it get executed.
so first part is which is indented under def add_numbers
is defining function and second one is call.
You can directly use a = add_numbers (1,2)
which also call that function and return value
0
Then you can print a if you want
0
Not if I don't use print at last then it doesn't execute, wait I'll send codes..
0
Run above code and see no output
0
As your program not printing any calculated value it's showing no output
even it's calculating them.
0
#paste ty
0
np
0
Hey wait
0
Send that again please I, deleted that unknowingly
0
Just click on link above