Curriculum topic

Loops and Repetition

A loop asks a program to repeat useful work without copying the same instruction again and again.

Why it matters

A small idea that returns in larger systems.

Games constantly redraw motion, check collisions, create waves, and update timers. Robots repeatedly read sensors and correct movement. Loops make that repetition visible, controllable, and easier to change.

Real-world connection

A lighthouse repeats a pattern, a traffic signal cycles through states, and a patrol checks the same route. Repetition becomes useful when the system also knows when to change or stop.

The connection shows where the idea returns; it does not claim every advanced application is taught in this first topic.

Math and logic kernel

The structure beneath the project.

Repeat count

Do an action a known number of times.

Forever

Continue while the program is running.

Repeat until

Stop when a condition becomes true.

Iteration

One pass through the repeated instructions.

Small examples

Make one relationship visible at a time.

1

Snowball wave

Create repeated hazards with controlled timing.

2

Animation cycle

Repeat costume and position changes.

3

Robot patrol

Repeat movement while checking for an obstacle.

4

Countdown

Update a value once per timed interval.

Program connections

Where this topic appears.

Active now

Scratch & Game Design

Beginner-friendly programming through original games, animations, simulations, and interactive stories.

Active now

Robotics

Commands, sensors, simple electronics, simulations, and physical systems organized around Sense, Decide, Act.

Available later

Roblox Studio / Lua

A future bridge from visual programming to Lua, 3D objects, events, and larger game systems.

Common mistakes

Useful clues, not reasons to stop.

Accidental forever loop

The program never reaches the instructions after the loop.

No changing value

A repeat-until condition can never become true.

Copying instead of looping

Many identical blocks make one change tedious and error-prone.

Repeating too quickly

The result is unreadable because timing was never considered.

Lesson and projects

Use the idea inside a working system.

Open Lesson
Scratch & Game Design Guided Class Project

Attack of the Angry Snowballs

Build a falling-object defense game with repeated waves, score, timing, and increasingly unreasonable weather.

  • Loops
  • Randomness
  • Coordinates
  • Collision
Open project