Week 15 • Thursday

Block 148: Capstone: Refactoring & Modularization

Restructure your code into clean, reusable modules.

Concepts

Code Examples

See exercise below.

Exercise

Refactor your project: move all functions to at least 2 separate .py files. Ensure your notebook can import and use them. Add docstrings to every function (what it does, args, returns).

Homework

Why is modular code better than a single long notebook? List 4 specific benefits. Friday