Example 1
Byte does not know how far the star is. Which loop helps?
- The path is straight, but long.
- repeat until ⭐ with move forward inside.
- Byte moves until it lands on the star, then stops.
Answer: repeat until ⭐: move forward
🧩 Block coding, Grade 5 · session 3 of 14 · 60 minutes · 🎁 free with an account
Sometimes you do not know how many times to repeat. Repeat until keeps going until something happens, like Byte reaching the star. The loop checks before each round.
A complete lesson · 60 minutes
Open this page with your learner and work down it, or press Teach this lesson to go through it one step at a time on a big screen. Every section has something to do.
Grade 5 · ages 9 to 11 · beginner
Warm-up · think first
You did not know how many claps; you kept going until something happened. That is repeat until.
Teacher tip: Play it twice with a different stopping point; ask how many claps they did.
Part 1 of 3 · learn, see, practise
repeat until ⭐ runs the blocks inside again and again until Byte is on the star.
You do not need to count the squares: the loop stops by itself.
Real-life loops: keep walking until you reach the door; keep stirring until the sugar melts.
Byte does not know how far the star is. Which loop helps?
Answer: repeat until ⭐: move forward
Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.
🎁 Free for a year
Every new account opens every lesson of every course free for a whole year: no payment, no card, nothing to cancel.
Unlocking the rest of this lesson gives you:
It takes a minute. Anyone under 13 signs up with a parent. The first 2 lessons of every course, every game and all maths practice stay free.
FAQ
A loop that keeps running its blocks until something becomes true, such as reaching the goal; it does not need a number.
A loop whose stopping rule never comes true, so it never ends. Programmers avoid them.
In the Classic Maze, repeat until appears around puzzle 10.
Start a conversation
Tell us the learner's age and level. A teacher from our network teaches with these lessons; we confirm timing and price first.