Every page in this folder is one complete, working Python program, printed in full β not a fragment, not a sketch. Type it in, run it, break it on purpose, and change it. In Grade 11 you read whole programs to learn how they were written. This year you read them the way you will read code for the rest of your life: as something that already works, that somebody else built, and that you are about to be responsible for.
The routine on every page is the same:
- Predict, in writing, before you run anything. A wrong prediction is worth more than no prediction.
- Run it and grade your own prediction. Where you were wrong, find out why before you go on.
- Name the model β which classes exist, and what real thing does each one stand for?
- Change it. Every page ends with three changes: one line, a few lines, then something that takes a period.
In reading order:
- Your First Class β one volunteer, modelled as an object
- Objects in a List β a whole club in one list, added to and taken from
- A Program with Two Classes β two files, two classes, and objects that call each other
- Using a Dictionary β a donation drive counted by name, not by position
- A Stack and a Queue β a hold list and an undo history, side by side
- Searching and Timing It β the same answer, found two ways, with a stopwatch
- Sorting and Timing It β a sort you write against the one Python ships
Notice who each program is for. A homework club, a Saturday tool library, a food bank, a library front desk, a community centreβs membership list, a swim coach. Not one of them is a puzzle. That thread runs straight into The Software Project, where the people are real, the team is yours, and the handover is the mark.
Two habits to bring with you. Read these programs the way Reading Somebody Elseβs Code describes β entry point first, nouns next. And when one of them breaks after you change it, that is not a setback; it is the fastest lesson on the page. Getting Unstuck has the method.