The repeat block

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

The repeat block

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What does the 'repeat 10' block do?
A It runs the blocks inside it 10 times
B It runs the blocks inside it forever
2. You want a sprite to move 10 steps three times. Which block should you use?
A repeat 10 with move 3 steps inside
B repeat 3 with move 10 steps inside
3. Which blocks run again and again?
A The blocks stacked below the repeat block
B The blocks inside the repeat block
4. How do you make a sprite spin around 20 times instead of 10?
A Change the number in the repeat block to 20
B Drag in 20 more repeat blocks
5. Why is repeat 10 with one 'move 5 steps' block better than stacking 10 'move 5 steps' blocks?
A It does the same job with fewer blocks
B It makes the sprite move faster than any other way

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1repeat 10 AThe move block is outside the repeat block, so it only runs once. It must go inside the loop to repeat 10 times.
2repeat 4 { move 10 steps; turn 90 degrees } BMoves and turns 4 times, which makes a square shape
3To make a sprite jump 5 times, choose the count 5 in the repeat block CRuns the blocks inside it 10 times, then moves on to the next block
4Blocks placed inside the repeat block run again on every loop DThe count is wrong. It should be repeat 3 so the dance runs 3 times, not 30.
5repeat 10 { } then move 10 steps Erepeat 3 { say Hello for 1 seconds }
6Goal: dance 3 times, but the block says repeat 30 Frepeat 5

Definitions

repeat 10

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
______ 10 move (10) steps
2.
repeat _ move (50) steps turn right (90) degrees
3.
repeat 10 ____ (10) steps
4.
repeat 5 move (20) steps ____ right (15) degrees
5.
repeat __ move (10) steps // moves 100 steps in total

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A when green flag clicked
B repeat 10
C move 10 steps
D turn 15 steps
E end
Question 2
A repeat
B move 10 steps
C say Hi! for 1 second
D end
Question 3
A when space key pressed
B repeat ten
C turn 36 degrees
D end
Question 4
A when green flag clicked
B loop 10
C move 5 steps
D end
Question 5
A when green flag clicked
B set score to 0
C repeat 5
D set score by 2
E end

Answer Key

The repeat block
Section A: Quick Questions
Q1
A — It runs the blocks inside it 10 times
Q2
B — repeat 3 with move 10 steps inside
Q3
B — The blocks inside the repeat block
Q4
A — Change the number in the repeat block to 20
Q5
A — It does the same job with fewer blocks
Section B: Match the Pairs
Q1
repeat 10 → Runs the blocks inside it 10 times, then moves on to the next block
Q2
repeat 4 { move 10 steps; turn 90 degrees } → Moves and turns 4 times, which makes a square shape
Q3
To make a sprite jump 5 times, choose the count 5 in the repeat block → repeat 5
Q4
Blocks placed inside the repeat block run again on every loop → repeat 3 { say Hello for 1 seconds }
Q5
repeat 10 { } then move 10 steps → The move block is outside the repeat block, so it only runs once. It must go inside the loop to repeat 10 times.
Q6
Goal: dance 3 times, but the block says repeat 30 → The count is wrong. It should be repeat 3 so the dance runs 3 times, not 30.
Section C: Definitions
Q1
repeat 10 — A block that runs the blocks inside it 10 times, then moves on. Change the number to set how many times. It saves you from stacking the same blocks again and again.
Section D: Fill in the Blanks
Q1
repeat 10 move (10) steps
Q2
repeat 4 move (50) steps turn right (90) degrees
Q3
repeat 10 move (10) steps
Q4
repeat 5 move (20) steps turn right (15) degrees
Q5
repeat 10 move (10) steps // moves 100 steps in total
Section E: Spot the Error
Q1
D — The turn block measures in degrees, not steps. The line should be 'turn 15 degrees'.
Q2
A — The repeat block needs a number so it knows how many times to run the blocks inside. It should be 'repeat 5'.
Q3
B — The repeat block needs a number to set the count, not a word. It should be 'repeat 10'.
Q4
B — The block is called 'repeat', not 'loop'. The line should be 'repeat 10'.
Q5
D — The 'set' block uses 'to' and would not add anything. To add 2 each time round the loop, use 'change score by 2'.