break and continue
break exits a loop immediately; continue skips the rest of the current iteration and moves to the next
Understanding break and continue in Python
What it does: break exits the loop immediately when the condition is met. continue skips printing when i==2 but the loop continues for other values. continue skips the rest of this iteration and jumps to the next one. break only makes sense inside a loop — Python raises SyntaxError otherwise. break is commonly used to exit a while True: loop based on user input. continue skips even numbers — only odd numbers reach print(). The loop prints 0, 1, 2 then breaks at i==3 before printing 3. Using break and continue to control the flow of a loop.
Common mistakes: break must be INSIDE a loop: it can't be used outside. break must be lowercase Break is not valid Python.
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 21–30) and word search (Modules 21–40).
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
breakFill in the Blanks
Spot the Error
Student with a class code? Join your class →