💻 TechnologyGrade 3Lesson 30
← Back🔒 PDF with full access

Coding Loops: Repeating Actions in Scratch

Lesson preview: the Mini Lesson and Vocabulary are open to everyone. Guided practice, exercises, the parent checklist and the printable PDF worksheet come with full access (free 7-day trial or membership).

Learning Objectives

  • 1Explain what a loop is and why programmers use them
  • 2Identify the "repeat X times" block in Scratch and describe what it does
  • 3Predict the outcome of a loop given the action and the number of repeats
📘

Mini Lesson

A loop is a block in Scratch that makes the computer repeat an action more than once without writing the same block many times. Instead of stacking "move 10 steps" ten separate times, you place one "move 10 steps" block inside a "repeat 10" loop. This saves time, makes code shorter, and is easier to read.

Types of Loops in Scratch

  • "Repeat X times" — runs the blocks inside it exactly X times, then stops.
  • "Forever" — runs the blocks inside it continuously until the red Stop button is pressed.
  • "Repeat until <condition>" — keeps repeating until a specific condition becomes true.

Reading a Loop

Every "repeat X times" loop has three parts you need to understand: (1) how many times it repeats, (2) the action (or actions) inside the loop, and (3) the expected outcome after all the repeats are done. For example, "repeat 4 times / move 10 steps" will move the sprite a total of 40 steps.

Scratch Repeat Loop StructureDiagram showing the three parts of a repeat loop block in Scratch.The "Repeat" Looprepeat 4 timesmove 10 steps(more blocks can go here)repeat countaction insideExpected outcome:sprite moves 4 x 10 = 40 steps totalTotal effect = repeats x single-action effect
Three Types of Scratch LoopsThree loop blocks: repeat X times, forever, and repeat until.Three Loop Typesrepeat X timesRuns exactly X times, then stops.foreverRuns until you press Stop.repeat untilRuns until a condition is true.
💡

To calculate the total effect of a loop, multiply the repeat number by the effect of one action. Repeat 5 × move 10 steps = 50 steps total.

Vocabulary
Loop
A code block that runs the same actions again and againe.g. A loop made my sprite spin five times.
Repeat
To do the same action over againe.g. I set the loop to repeat ten times.
Action
The single step that the loop runs each timee.g. My action moves the cat 10 steps.
Iteration
One run of the loop's actione.g. Each iteration moves the sprite forward.
Forever loop
A loop that runs without stopping until you click stope.g. A forever loop keeps the bird flapping.
Free · 7 days · No credit card

Unlock the full HSEA system for 7 days.

Add your first kid profile and your 7 days start: every lesson in every grade, saved progress for each child. Nothing to set up, no card required, nothing to cancel.

  • ✓ All 1,680 lessons, Grades 1–6, every subject
  • ✓ Profiles + saved progress for every kid
  • ✓ Printable lessons with answer key
Start your 7-day free trial →
← Lesson 29: Coding Sequences: Instructions in OrderLesson 31: Coding Events: Triggers and Responses →