For Loops
A for loop iterates over each item in a sequence one at a time
Understanding For Loops in Python
What it does: A for loop repeats a block of code once for each item in a sequence — a list, a string, or a range() of numbers. The loop variable (often i or x) takes each value from the sequence in turn, connected by the keyword in: for i in range(5):. Like an if statement, the line must end with a colon and the repeated code must be indented underneath it.
Common mistakes: Forgetting the trailing colon (for i in [1, 2, 3] instead of for i in [1, 2, 3]:) is the most common slip. It's also easy to forget that range(5) produces 0, 1, 2, 3, 4 — five numbers starting at 0, not 1 through 5.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 11–20) and word search (Modules 1–20).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
forFill in the Blanks
Spot the Error
Student with a class code? Join your class →