13,420
edits
Changes
→PART 1 - Using Functions
greeting = 'Good Morning ' + name
return greeting
</source>:#The different One major difference between a function '''returning a value ''' and simply '''printing a value, ''' is that '''returned ''' values can be caught and stored in variables used in the program (that called the function) for later use. Once the returned value has been stored, it can be printed, manipulated, compared in IF statements, and moreetc. Below will cover how to store a returned value.<br><br>:#Enter the following function in the ipython3 shell to see returning a variable's value works:<source>
text = return_text_value()
</source>