Functions, Modules, and Readable Code
Refactor repeated logic into clear functions and modules.
Executable courseUse the text pages for explanation and the browser notebook for practice. Work stays in this browser unless you download it.
Module sequence
- Why Functions HelpUnit 1 · 18-25 minutes
- Parameters and ArgumentsUnit 2 · 22-30 minutes
- Return Values: Separate Work from DisplayUnit 3 · 22-30 minutes
- Scope and Side EffectsUnit 4 · 25-35 minutes
- Docstrings and Basic Type HintsUnit 5 · 22-30 minutes
- Objects, Attributes, and MethodsUnit 6 · 20-30 minutes
- Imports and Standard-Library ModulesUnit 7 · 22-30 minutes
- Packages, Environments, and VersionsUnit 8 · 22-30 minutes
- Naming and Separating ConcernsUnit 9 · 25-35 minutes
- Applied Checkpoint: Refactor Course-Record CleaningUnit 10 · 45-60 minutes
