For loops
A for loop runs a fixed number of times, like a running track with a set number of laps. range() decides how many laps and where they start.
Why type a line one hundred times when you can teach the computer to type it for you?
A loop repeats a block of code without repeating the typing. Students meet the counted loop (do this ten times) and the conditional loop (keep going until something changes), and learn to spot which one a problem is asking for.
Loops are where students first feel real leverage — five lines of code producing a page of output. It is also where patience with debugging genuinely begins.
Three core ideas, each taught with worked examples and then practised until it feels obvious.
A for loop runs a fixed number of times, like a running track with a set number of laps. range() decides how many laps and where they start.
A while loop keeps going as long as a condition stays True — a game that runs until lives reach zero, or a question repeated until the answer is valid.
An infinite loop happens when the exit condition can never be reached. Reading your own loop out loud and asking “what makes this stop?” fixes it almost every time.
The first infinite loop in this class is a rite of passage. Ctrl + C is the escape hatch every programmer learns on the same day.
“The loop is broken because it printed too much.” Usually the loop is fine and the print statement is simply sitting inside it when it belonged outside.
Sessions 25–32 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 for loops.
Guided teaching on for loops, worked through together with the teacher.
Independent practice, small challenges and one deliberate mistake to diagnose.
Guided teaching on while loops, building directly on the previous two sessions.
Applied tasks that combine for loops and while loops in one piece of work.
Debugging infinite loops introduced and practised, completing the toolkit needed for the project.
Guided build session for the module project: Pattern and times-table generator.
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 32.
Use nested loops to print a multiplication grid from 1 to 10, lined up in neat columns. Getting the spacing right is a puzzle of its own.
Students finishing Module 4 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.