Loop Builder

Put a useful sequence inside REPEAT, compare it with expanded instructions, and debug off-by-one repetition errors.

Grade 4 · CMP-0012 / CMP-0013 · no voice

Command bank

Loop program

REPEAT TIMES
END REPEAT
Choose commands for the loop body and a repeat count.

Output and reasoning

Run a loop to create output.
0expanded command executions
1instructions written using a loop

Execution trace

  1. No loop run yet.

The loop body stays in sequence. REPEAT controls how many times the complete body runs. One too few or one too many is an off-by-one error.

⌂ Orco Academy
🌱 Primary · Grades 3–5 · Computing

How “Loop Builder” works

🎓 You are learning to: Put a useful sequence inside REPEAT, compare it with expanded instructions, and debug off-by-one repetition errors.

Welcome! Three steps and you are learning:

  1. 📖 Read the challenge

    It tells you what to build, sort or fix.

  2. 🧪 Experiment

    Try things and watch carefully what happens. You can always reset.

  3. 🔧 Fix and improve

    Use the feedback like a detective: what clue tells you what to change?

💡 Top tip: if you get it wrong, that is useful — find out why before trying again.

Nothing you do here is saved or sent anywhere — experiment freely. Reopen this guide any time with the ? Help button.