Scratch repeat block as a for loop
Python's version of the Scratch repeat 10 block. The lines indented under it run 10 times, and i counts from 0 to 9.
Understanding Scratch repeat block as a for loop in ACARA Digital Technologies Years 7–8
What it does: The number in repeat 4 goes inside range(4), and the block inside the repeat becomes a line indented under the for line. Python uses indentation, usually 4 spaces, to show which lines belong to the loop. The line must end with a colon. Without it Python gives a SyntaxError. Counting starts at 0, so i goes up to 9. The loop still runs 10 times. i counts from 0 to 9, which is 10 values, so the print line runs 10 times.
Common mistakes: The string is missing its closing quote. The line inside the loop should be ' print("Step")'. The for line must end with a colon. It should be 'for i in range(10):'.
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 482–519) and word search (Modules 420–519).
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
for i in range(10):Fill in the Blanks
Spot the Error
Student with a class code? Join your class →