Python: Functions & Decorators
Functions are the building blocks of Python programs, and understanding them deeply — from argument passing to closures to decorators — separates intermediate Pythonistas from advanced ones. This quiz covers the full range of Python function features.
Questions test knowledge of positional and keyword arguments, *args and **kwargs, lambda functions, variable scope (LEGB), closures, and decorators. These concepts underpin everything from simple utility functions to frameworks like Flask and Django.
If you've ever wondered how @property or @staticmethod actually work, or what a closure really is, this quiz will solidify your understanding.
What This Quiz Covers
- Positional, keyword, default, and keyword-only arguments
- *args and **kwargs: collecting and unpacking arguments
- Lambda functions: syntax, use cases, and limitations
- Variable scope: LEGB rule (Local, Enclosing, Global, Built-in)
- Closures: functions that remember their enclosing scope
- Decorators: wrapping functions to extend behavior
- functools.wraps and preserving function metadata in decorators
Cletica
Want to create your own quiz?
Build surveys and quizzes, share with anyone, collect responses — free to start.
Try Cletica for free →