Python Functions · Week 3 — Return Values (Practice)
30 questions: print vs return contrast; spiral review of Weeks 1-2; 5 challenge questions.
Python Coding Practice: Python Functions Week 3: Functions That Give Back Answers (Level 1)
This practice set is all about functions that use the return statement to give back answers.
You will write functions that calculate and send values back to the caller.
Reminder
- Define a function with
def, name it, and use parentheses()for parameters. - Use the
returnkeyword inside the function to send a value back. - Call the function and store the result in a variable, like
result = my_function(). - If there is no
returnstatement, the function returnsNoneautomatically.
Preview truncated — download the notebook to see the full lesson.