Collection selection
Choosing a collection: a list for an ordered sequence, a tuple for values that must not change, a dictionary when each value has a natural label like "name" or "score".
Different jobs need different containers. Choosing well is half the solution.
Lists keep order, tuples refuse to change, and dictionaries look things up by name instead of position. Once students can nest them, they can model almost any real-world information.
Choosing the right structure often removes the need for clever code entirely. It is the earliest form of genuine design judgement.
Three core ideas, each taught with worked examples and then practised until it feels obvious.
Choosing a collection: a list for an ordered sequence, a tuple for values that must not change, a dictionary when each value has a natural label like "name" or "score".
Nested data means collections inside collections — a list of dictionaries is how almost every real dataset on the internet is shaped.
Updating safely means knowing which structures can change in place and which cannot, and what happens when two names point at the same list.
Dictionary lookup barely slows down as it grows. Searching a million-key dictionary takes roughly the same time as searching one with ten.
“A dictionary is just a fancy list.” A list finds by position; a dictionary finds by meaning. That difference changes how you design the whole program.
Sessions 33–40 of the 72-session year, at two one-hour sessions per week.
Where this module fits, what you will build, and a hands-on starter that gets everyone curious about collection selection.
Guided teaching on collection selection, worked through together with the teacher.
Independent practice, small challenges and one deliberate mistake to diagnose.
Guided teaching on nested data, building directly on the previous two sessions.
Applied tasks that combine collection selection and nested data in one piece of work.
Updates introduced and practised, completing the toolkit needed for the project.
Guided build session for the module project: Student score tracker.
Finish, test against the checklist, present the work and explain the decisions behind it.
Every module ends with something the student built themselves and can demonstrate. This is the piece that goes into their portfolio and gets explained out loud at the end of session 40.
Store five classmates as a list of dictionaries with name, subject and score, then print the top scorer without sorting by hand.
Students finishing Module 5 can:
The vocabulary introduced here, in plain language:
6 quick questions drawn from this module — vocabulary, the project you build, and a myth-or-fact round. Every wrong answer explains itself, so a mistake still teaches you something.
Tell us your child’s class and what they enjoy. We will suggest the closest program fit—no pressure and no upfront payment.