Stage 2
Stage 2: Intermediate
Goal: Write well-organised, tested Python programs that use classes, talk to web APIs and store data in a database. Time: about 2 weeks at ~1 hour a day (~12โ14 hours including the project) ยท Level: you have finished Stage 1
Parts in this stage
Do them in order. Each part builds on the ones before it. When a later topic shows up early, it is marked with a note like (Part 11).
| Part | Topic | You will build | Time |
|---|---|---|---|
| 9 | Object-oriented Python | Bank account system | ~1 h |
| 10 | Pythonic and functional Python | Log-processing pipeline | ~1 h |
| 11 | Testing and code quality | A fully tested grade calculator | ~1 h |
| 12 | Web, APIs and databases | Weather report with SQLite | ~1 h |
| ๐ | Project: Library manager | Command-line library system: OOP + SQLite + tests | ~8โ10 h |
How every part is organised
part-NN-topic/
โโโ README.md โ 1. read the lesson
โโโ examples/ โ 2. run the example programs
โโโ exercises.md โ 3. solve the practice questions yourself
โโโ solutions/ โ 4. only then compare with the solution
โโโ tests/ โ (Part 11 and the project) automated tests run with pytest
How to study each part
- Read the part's
README.md. Type the snippets yourself. - Run each file in
examples/, then change something and run it again. - Solve
exercises.mdin order: ๐ข easy โ ๐ก medium โ ๐ด challenge. - Check your answer against
solutions/only after you have tried. - Tick the โ checklist at the end of the part.
๐ก Already experienced? Skim the beginner text and look for the ๐ Going deeper notes.
How to run the code
python3 stage-2-intermediate/part-09-object-oriented-python/examples/07_bank_account_system.py
On Windows, use python (or py) instead of python3.
Packages: Parts 9, 10 and 12 use only the standard library. Part 11 and the project use pytest. Install it once in a virtual environment (Part 7):
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install pytest
Stage 2 checklist
- Parts 9โ12 done, with every exercise attempted
- Library manager project built, with all its tests passing
- Your practice code saved on GitHub (Part 11 shows how)
- (Optional) Took a PCAP practice test (the Python Institute's associate-level Python certificate)
Next: ๐ด Stage 3: Advanced (concurrency, internals, advanced typing, packaging)