Python Functions Quiz

Test your understanding of Python functions, from def and return to arguments, *args and **kwargs, scope, closures and recursion.

Intermediate 5 quizzes · 50 questions about 33 minutes
0/5passed Category exam 20 mixed questions. 80% earns a certificate.
Tags:
1 Defining Functions & return Easy Define functions, call them, and know exactly what they return. #functions#return 10 questions · ~5 min Not started Start
2 Default & Keyword Arguments Medium Use default values and keyword arguments, and avoid the mutable default trap. #arguments#gotchas 10 questions · ~6 min Not started Start
3 *args and **kwargs Medium Collect extra arguments with *args and **kwargs and unpack lists and dicts into calls. #args-kwargs#unpacking 10 questions · ~6 min Not started Start
4 Scope & global Hard Local and global names, nonlocal, closures and the UnboundLocalError trap. #scope#closures#gotchas 10 questions · ~8 min Not started Start
5 Recursion Hard Trace recursive calls, find missing base cases and spot recursion bugs. #recursion#interview 10 questions · ~8 min Not started Start