Python by Projects
Learn Python by building things
Contents
10 units, 4 checkpoints, 2 projects, in the order the course teaches them.
- Unit 1: Story MachineExercises (9): Story MachineSlides: Story Machine
- Unit 2: Number DetectiveExercises (10): Number DetectiveSlides: Number Detective
- Checkpoint 1: First StepsQuestions (7): Checkpoint 1 — First Steps
- Unit 3: Turtle Art StudioExercises (12): Turtle Art StudioSlides: Turtle Art Studio
- Unit 4: Quiz ShowExercises (21): Quiz ShowSlides: Quiz Show
- Unit 5: Function FactoryExercises (22): Function FactorySlides: Function Factory
- Checkpoint 2: Loops and FunctionsQuestions (8): Checkpoint 2 — Loops and Functions
- Project 1: Arcade NightProblems (4): Arcade Night
- Unit 6: Secret CodesExercises (24): Secret CodesSlides: Secret Codes
- Unit 7: High-Score Hall of FameExercises (24): High-Score Hall of FameSlides: High-Score Hall of Fame
- Unit 8: Word WizardExercises (23): Word WizardSlides: Word Wizard
- Checkpoint 3: Data WranglerQuestions (8): Checkpoint 3 — Data Wrangler
- Unit 9: SAVE POINTExercises (25): SAVE POINTSlides: SAVE POINT
- Unit 10: PET SIMULATORExercises (26): PET SIMULATORSlides: PET SIMULATOR
- Checkpoint 4: Year One FinaleQuestions (8): Checkpoint 4 — Year One Finale
- Project 2: Grand AdventureProblems (5): Grand Adventure
Printable books (PDF)
Release pdfs-2026-09-30. The links open the files on GitHub.
For parents and teachers:
Use this book offline
Downloading a book needs JavaScript.
Everything stays on this device. Some browsers, Safari in particular, can clear a site's storage after weeks without a visit: keep a copy of your work with “Export my progress” on the home page.
Concept mastery
The share of each concept's quiz cards you know well (answered right twice, at least a day apart). Practise with the quiz cards.
All 40 concepts
IO
- Printing output0%
- Reading user input0%
Strings
- String literals and quotes0%
- f-string formatting0%
- String concatenation and repetition0%
- String slicing0%
- String methods (case, strip/replace, split/join, find, is-tests)0%
- Membership testing with in0%
Data
- Floats and decimal arithmetic0%
- Arithmetic operators (+ - * / // %)0%
- Type conversion (int/str/float)0%
- Boolean values0%
Control
- Comparison operators0%
- Logical operators (and/or/not)0%
- if statements0%
- elif and else branches0%
Loops
- while loops0%
- Loop control (break/continue)0%
- for loops0%
- The range function0%
- Accumulator pattern0%
- Nested loops0%
Modules
- Importing modules0%
- Random numbers (randint/choice)0%
Functions
- Defining functions0%
- Function parameters and arguments0%
- Return values0%
- Built-in functions (len/min/max)0%
Collections
- Creating lists0%
- Growing and changing lists (append/insert/pop/remove)0%
- Sorting lists with the sort method0%
- Creating dictionaries0%
- Looping over dictionaries0%
Files
- Reading files0%
- Writing files0%
- Opening files with with0%
OOP
- Defining classes0%
- __init__ and creating objects0%
- Object attributes0%
- Object methods0%