break and continue
break exits a loop immediately; continue skips the rest of the current iteration and moves to the next
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 journey and assign it to your class.
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
Create a free class, add this module to a journey, and track who's stuck.
Create a free teacher account →No credit card. No setup fee. Make a class and invite students in under three minutes.
Practice this topic interactively, track progress, and unlock badges.
Start Learning Free →