Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
return doesn't print anything, it just returns a value from a subroutine, like function or method. This is about the same in every language. Please try to use the search function here, because this has been asked oftentimes before! https://www.sololearn.com/discuss/2086620/?ref=app https://www.sololearn.com/discuss/31667/?ref=app https://www.sololearn.com/discuss/61131/?ref=app https://www.sololearn.com/discuss/1383945/?ref=app https://www.sololearn.com/discuss/12431/?ref=app
24th Jan 2020, 10:18 AM
HonFu
HonFu - avatar
+ 2
return is also not a method. It is a statement. Sqr() is a method or function, in your example.
24th Jan 2020, 11:47 AM
Sonic
Sonic - avatar