0

Return function?

I can't really understand the function of return. Can you please help me? thanks

14th Aug 2020, 1:16 AM
John Michael Intales Calumpag
John Michael Intales Calumpag - avatar
5 odpowiedzi
+ 2
Think of function like a machine, with input, process and output. Input are passed from main program to the process unit by arguments. Output are passed by process unit back to main program by return. For example, https://code.sololearn.com/cw2XMUsZndcR/?ref=app
14th Aug 2020, 1:46 AM
Gordon
Gordon - avatar
+ 1
I just went to code the demo for you and have appended to my previous answer. By the way, who downvoted my answer? You?
14th Aug 2020, 1:50 AM
Gordon
Gordon - avatar
+ 1
You are welcome ^^ Good luck with your learning.
14th Aug 2020, 3:39 AM
Gordon
Gordon - avatar
0
Thanks for the answer. but can you give me one of scenario where return function should be use?
14th Aug 2020, 1:48 AM
John Michael Intales Calumpag
John Michael Intales Calumpag - avatar
0
I am sorry I don't know that is a button for downvote, I see your code, it helps me a lot. Thank you very much. I am just a newbie here with no IT certificate nor degree. I am Science teacher but I want to learn this trendy programming. Thank you for your effort to answer with your code.
14th Aug 2020, 2:50 AM
John Michael Intales Calumpag
John Michael Intales Calumpag - avatar