6.4 - Return Values
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
What does the return keyword do in a function?
💡 Hint: Think about what happens when a function finishes running.
Write a simple function that returns the value 2 + 2.
💡 Hint: Make sure to use the return keyword!
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What does the return keyword do in a function?
💡 Hint: Consider what happens at the end of a function.
True or False: If a function does not have a return statement, it automatically returns None.
💡 Hint: Think back to how functions behave.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Write a function that calculates the square of a number and the original number. What should be returned and how can it be used?
💡 Hint: What will you need to return in order to get both values?
Create a function that takes a list and returns the minimum and maximum values. How will you implement this?
💡 Hint: Think about how to find the values within the list!
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.