Lesson details

Key learning points

  1. In this lesson, we will take a look at all of the types of loops that you can use in Scratch. We will learn how to evaluate which loop to choose for each problem that we want to solve.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

Loading...

3 Questions

Q1.
A learner has created the following piece of code to check if a password is correct or not. They want to improve it so that it will only give a maximum of three attempts before locking them out of the game for 60 seconds. What programming construct should they use for this? (Source: Scratchblocks)
An image in a quiz
A Forever loop
A Repeat 3 loop
Correct answer: A Repeat until loop
Three If/else statements
Q2.
A learner has created the following block of code, when will the loop terminate? (Source: Scratchblocks)
An image in a quiz
Correct answer: Never
When ‘number’ holds the value ‘3’
When ‘number’ holds the value ‘4’
When ‘number’ is higher than ‘3’
Q3.
What will be the output of this program when it is executed? What will the sprite say? - (Source: Scratchblocks)
An image in a quiz
1, 2, 3, 4
1, 2, 3, 4, 5
Correct answer: 1, 2, 3, 4, 5, 6
Nothing

3 Questions

Q1.
What does this block of code do? (Source: Scratchblocks)
An image in a quiz
Counts to three and then moves on to the next block
Correct answer: Pauses for either 1, 2 or 3 seconds
Picks a random number between 1 and 3
Waits for 3 seconds
Q2.
Which type of loop should you use in Scratch if you want to repeat some instructions for a set amount of times?
Forever loop
Correct answer: Repeat (n) loop
Repeat until loop
Q3.
All of the blocks of code below will execute a countdown timer. Select the most appropriate block for this purpose when using Scratch. (Source: Scratchblocks)
An image in a quiz
A
B
Correct answer: C
D