English
Topic 3. Functions: parameters and arguments, scope, recursion, and type hints
Goal: learn to decompose a console program into functions, use different parameter kinds, document and annotate contracts, build closures, and check recursive algorithms.
Lecture contents
- Function definitions and arguments — Definition, call, and result · Positional, keyword, and optional arguments
- Parameter kinds and passing objects — Parameter kinds and unpacking · Passing objects and pure functions
- Functions as values and scope — Functions as values and scope
- Recursion and the call stack — Recursion and the call stack · Recursion, iteration, and repeated calculations
- Type hints and PyCharm — Type hints in Python 3.14 · Working with functions in PyCharm · Common mistakes and checking contracts