Course A — Software engineering foundations
Unit 5 — Packages, PyPI and PEP 8
Self-paced · about 60 minutes · Course A, chapter 1 of 4
Learning objectives
- Read a function's signature and documentation from
help()before calling it. - Rewrite a file until a PEP 8 linter has nothing to report, without changing what it does.
- Recognise the three shapes of modular Python: a package, a class, a method.
Lessons
| Lesson | What you leave with |
|---|---|
| 1. Packages and PyPI | Where pip install gets a package, and how help() documents it offline |
| 2. Conventions and PEP 8 | The codes pycodestyle and ruff print, and what each one asks you to change |
| 3. Python, data science and software engineering | Modularity, documentation, testing, version control: the four words the course uses |
Checking your answers
Every exercise in notebook.ipynb has the same shape: context, numbered
instructions, a starter that runs as shipped and gives a wrong or incomplete
answer (marked <------ EDIT THIS LINE), the expected output, and a
check(...) cell that prints ✅ or ❌ with the fix named. The last cell,
review("w05"), is the scorecard.
Working with a coding assistant: give it the exercise's context and
instructions, let it edit the marked lines, then run the check cell yourself.
You read the verdict, not the assistant. solutions/notebook.ipynb is the
reference; open it after the check, not before.
Slides
slides.md is a Marp deck. Read it as Markdown, or render it:
npx @marp-team/marp-cli slides.md -o slides.pdf