0

What does it mean by ' return' in cooding?and why it is use??

8th Mar 2017, 5:33 PM
mahmudul hasan
mahmudul hasan - avatar
2 Réponses
+ 1
I want you to take a close look at this code for a minute. def square(x): return x * x n = square(4) print(n) After I declared the "square" function, I had the result of square(4) stored in n, so n = 16.
8th Mar 2017, 5:45 PM
DaemonThread
DaemonThread - avatar
0
return tells a function to stop execution and give the value it evaluated back to the caller, killing the function in the process.
8th Mar 2017, 6:43 PM
Amaras A
Amaras A - avatar