A brass loop sculpture beside a short row of emerald ceramic blocks
Decorative metaphor for finite and continuous repetition, not executable code or an exact cycle count.

A child has made a small lantern sprite change from dim to bright and back again. The animation works once. “Now I want it to happen three times,” the child says. An adult copies the same instructions twice more. Then the child changes their mind: “What if it keeps going until I stop it?” This illustrative scene introduces a useful coding question: should a sequence repeat a known number of times, or continue without a preset count?

In Scratch, loops help children express that intention without copying a long list of identical instructions. But learning a loop is more than finding a curved block. The child needs to identify the sequence inside it, predict what one complete repetition does, and understand how the repetition finishes. A small animation makes those ideas visible while keeping movement, scores and other game features out of the first comparison.

Choose a small sequence with a clear beginning and end

Use a sprite with two prepared costumes, one dim and one bright. They can be simple shapes made with adult help; the child does not need detailed artwork. Keep the sprite in the same position and use one active script for this exercise. Name the costumes clearly in the project. The names are chosen for the exercise, not official Scratch interface labels.

The sequence is: switch to the bright costume, wait one second, switch to the dim costume, wait one second. First test that sequence once. A wait between changes helps the viewer see them. Without a visible pause, the changes may appear to happen too quickly to follow. Keep the timing comfortable and the purpose simple: one complete cycle goes bright, then dim.

Put the whole cycle inside a counted repeat

In the English interface, the control block called “repeat” runs the enclosed instructions a specified number of times. Put all four instructions inside it and set the count to 3. Start the script with the green-flag event and set the costume to dim before the loop. That starting instruction establishes a consistent state every time the project is run; it is outside the repeated body.

Before pressing the flag, ask the child to predict how many complete bright-and-dim cycles will occur. The answer is three. There will be three switches to bright and three switches to dim, not six whole cycles. After the third cycle, this loop finishes and the script can continue to a following instruction if one has been added. The number refers to repetitions of the entire enclosed sequence.

Trace the body instead of guessing from the block count

Use a finger to follow the instructions in order, with the project stopped. After the final wait, return to the first instruction inside the loop for the next repetition. A small three-row checklist can record completed cycles. It is a thinking aid, not extra code. Ask the child which actions happen once per cycle and which happen only at the beginning of the project.

If the animation does not match the prediction, inspect the boundary of the loop. Perhaps the final wait or the switch back to dim sits outside it. Copying more blocks will not necessarily fix that structural mistake. Ask what belongs to one complete cycle, move only the relevant instruction, and test again from the same initial state. This keeps debugging tied to the intended behaviour.

Compare a continuous loop without changing the task

Keep the same two costumes and four-step cycle, but compare it with the English-interface block called “forever.” It repeats its enclosed instructions continuously while that script is running, rather than stopping after a preset count. Ask what the child expects after the third cycle this time. The animation continues to another cycle instead of finishing at three.

Show the project’s stop control before testing. Use it when the comparison is clear. Stopping the project ends the running animation, but does not mean the current costume has automatically returned to the starting one. Pressing the flag runs the explicit “set costume to dim” instruction again. This is why a clear starting state matters when comparing repeated tests.

Choose the loop from the intention

A counted repeat suits a task with a known repetition count, such as showing this cycle three times. A continuous loop suits an animation intended to keep running until the project is stopped or another stopping mechanism acts. Neither is the “better” block in every project. The useful question is what the programme should do and when that behaviour should end.

Do not introduce conditions, nested loops, timers and several sprites immediately. They are useful later, but can hide the first distinction. If the child can explain “three complete cycles” versus “keep cycling while running,” there is already something meaningful to build on. Change one decision at a time so the observed result can be connected to the code that produced it.

Make room for prediction in family practice

A family in Doha might try this after a coding lesson; a family in the Netherlands might use it during a weekend activity. The exact picture can change without changing the learning aim. A flower with open and closed costumes can replace the lantern. Keep the two-state sequence clear, avoid distracting sound and let the child explain their prediction before the adult takes the controls.

If the Scratch interface is in another language, use the local interface with the teacher’s help. The English block names here identify the functions being compared; translated labels can differ. Ask the child to find the control that accepts a repetition count and the one that continues without a preset count. Recognising the function is more useful than memorising a label without understanding its effect.

Check whether the child can adapt the idea

Change the counted loop from three cycles to two and ask for a prediction before running it. Then restore three and ask the child to identify exactly what belongs inside the loop. These small changes check understanding without demanding an entirely new game. Record a useful observation: “Predicts the count; needs help including the final wait.” That is a clear teaching next step.

When choosing coding and technology lessons, ask how the teacher uses prediction, testing and explanation before adding complexity. A free trial can start with a small working sequence rather than an impressive finished project. The useful goal is a child who can describe one cycle, choose how it should repeat and explain why the result matches—or differs from—their intention.

Share this article

Stay in the loop

Learning tips, new articles and academy updates, delivered to your inbox.

English