Block coding lesson 15: Repeat until the star
US version. US grades and US spelling. · UK version of this lesson
repeat until at the star checks BEFORE each time round. If Myrtle is already at the star, the blocks inside do not run at all. A complete 40-minute block coding lesson (Grades 4–5), from Unit 5: Choices: if, else and repeat until. Myrtle the Turtle runs right here in your browser – nothing to install.
- Time
- 40 minutes + 20 min homework
- Grade
- Grades 4–5 (ages 9–11)
- You need
- A computer or tablet, squared paper and a pencil
- Graded
- Instantly, with explanations
For parents: how to use this lesson
You don't need to know anything about coding. The lesson explains each step on screen, the way Mr Babbage, our Head of Computing, likes it: watch Myrtle first, then have a go. Programs are made from blocks – no typing – and every answer is graded straight away.
- Before the screen: Fill a cup "until it is full" with water – how is that different from "pour 5 times"?
- Press Start the lesson below and watch the worked examples together. Press Run and say what each block does before Myrtle does it.
- Let your child do the practice on their own. When Myrtle goes the wrong way, that's a clue, not a failure – press Run again and watch which block it is on.
- Finish with the talk question: “When is repeat until better than repeat 5 times?”
- Later that day or the next day: the homework (20 minutes), then a practice test.
Watch out for
- Thinking the loop always runs at least once. It checks first. If the condition is already true, it skips straight past.
- Thinking it stops in the middle of the blocks inside. It only checks at the top, before each time round.
Miss Lovelace's tip for home: ask your child to be Myrtle. Read out the blocks and let them walk it on the floor. If they can act it out, they understand it.
What your child will learn
Learning goal: use repeat until.
Success looks like
- I can use repeat until.
- I can say when a repeat until loop stops.
- I can write a program that reaches the star on mazes of any length.
Key words
repeat until · condition · stop · loop
The big ideas (for the adult)
repeat until at the star checks BEFORE each time round. If Myrtle is already at the star, the blocks inside do not run at all.
We do not need to count the squares: the loop keeps going until the condition is true. That is why it works on mazes of different lengths.
A worked example
repeat until at the star
move forward 1
endPress Start the lesson to watch the turtle run it.
The lesson, step by step
| Part | Time | How it is checked |
|---|---|---|
| Starter | 5 min | Graded by Classfern |
| Teach | 8 min | Watch, talk and try |
| Worked example and try it | 8 min | Graded by Classfern |
| Practice | 14 min | Graded by Classfern |
| Wrap up | 5 min | Graded by Classfern + self-check |
The lesson
It runs here on the page. No sign-up and no names – progress is kept only in this browser. Each visit picks a new mix of questions.
Homework
20 minutes: 6 questions – work out what Myrtle does, then build or fix a program – and a short reflection. New questions every time, all graded instantly. Away from the screen: fill a cup "until it is full" with water – how is that different from "pour 5 times"?
Practice tests
- Block Coding: Choices: If, Else and Repeat Until Practice Test (Grades 4–5)12 questions · graded instantly
- Block Coding: Mixed Practice Test (Grades K–5)15 questions · graded instantly
All computer science practice tests · All 18 block coding lessons
Curriculum
CSTA K–12 Computer Science Standards (2017), grades 3–5: 1B-AP-10 – Build programs with sequences, events, loops and conditionals; 1B-AP-15 – Test and debug a program or algorithm so it works as intended.
The standard codes are CSTA's; the descriptions are our own words.
Our lessons, blocks and questions are our own. They are not written or endorsed by any government department, testing agency or exam board.