← All topics
Quiz: Python Functions: questions with answers
15 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does this print? (code)
- Q2. What does this print? (code)
- Q3. What type is args inside def f(args)?
- Q4. What does this print? (code)
- Q5. Why is def f(items=[]) risky?
- Q6. What does this print? (code)
- Q7. What does this print? (code)
- Q8. What does this print? (code)
- Q9. What does this print? (code)
- Q10. What does this print? (code)
- Q11. What does this print? (code)
- Q12. What does this print? (code)
- Q13. What does this print? (code)
- Q14. What is the safe way to give a function an optional list parameter?
- Q15. What is the difference between print() and return inside a function?