I show you how to write functions that can return values in your Python programs. This allows you to write functions that can take some arguments (inputs), do something with the arguments (processing), and get the result out (output).
We start off by comparing void functions to value-returning functions.
Then, I write a sample program that walks you through writing functions to add two numbers and return the sum, returning the results of arithmetic expressions, returning a literal, and returning multiple values from the same function.
We then use those values returned from the functions for further processing.
// Learn More //
Check out my complete Python videos playlist:
• Playlist