New
New
Year 4

Count-controlled loops

I can modify a count-controlled loop to produce a given outcome.

New
New
Year 4

Count-controlled loops

I can modify a count-controlled loop to produce a given outcome.

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

Key learning points

  1. Changing the number of repetitions in a count-controlled loop changes the outcome.
  2. The outcome of a program containing a count-controlled loop can be predicted.
  3. Changing a value of a command will have an effect on a loop.

Keywords

  • Value - a number that is used in a command

  • Count-controlled loop - a chunk of code that repeatedly runs a section of the program a certain number of times

  • Trace - carefully following a program line by line to predict what it will do

Common misconception

A loop with a high number always makes a big shape.

The number in the loop affects the number of sides, not the size. The fd value controls the size.


To help you plan your year 4 computing lesson on: Count-controlled loops, download all teaching resources for free and adapt to suit your pupils' needs...

In Logo, the exterior angle is used when calculating the turn required to create different shapes. This is best modelled on a whiteboard by showing the relationship to a straight line of angle 180 degrees and the internal angle.
Teacher tip

Equipment

Software that can run Logo code is required to complete activities. This could be downloaded software such as FMSLogo or online alternatives.

Licence

This content is © Oak National Academy Limited (2025), licensed on Open Government Licence version 3.0 except where otherwise stated. See Oak's terms & conditions (Collection 2).

Lesson video

Loading...

6 Questions

Q1.
What does the
repeat
command do in a program?
stops the program
changes the value of a command
moves the turtle to its starting position
Correct answer: runs a set of commands multiple times
Q2.
What is a count-controlled loop?
a loop that repeats a task until a condition is met
Correct answer: a loop that repeats a specific number of times
a loop that only works with patterns
a loop that fixes errors in the program
Q3.
What is an algorithm?
Correct answer: a precise sequence of steps to solve a task
a random set of commands
a computer program
a tool to fix syntax errors
Q4.
What happens if you change the value of a command?
It has no effect.
The program stops working.
The command is deleted.
Correct answer: The program behaves differently.
Q5.
What does the
home
command do in a turtle program?
Correct answer: moves the turtle to its starting position
draws a straight line
stops the program
changes the turtle's direction
Q6.
What is the term for the rules about how a programming language should be written?
Correct Answer: syntax, yn

6 Questions

Q1.
What does the
fd
command control in a program?
the number of sides in a shape
the number of repetitions in a loop
Correct answer: the distance the turtle moves
the direction the turtle turns
Q2.
What is the relationship between a loop's number and its outcome?
Correct answer: The number controls the number of repetitions.
The number controls the size of the shape.
The number makes the program faster.
The number changes the turtle's colour.
Q3.
What is the term for carefully following a program to predict its outcome?
Correct Answer: tracing, trace
Q4.
Put these steps in order to trace a program.
1 - Read the program line by line.
2 - Predict the outcome of each step.
3 - Compare your prediction to the actual result.
Q5.
Does a loop with a high number always create a big shape?
Yes, because the number in the loop controls the size of the shape.
Yes, because a high number makes the turtle move further.
Correct answer: No, the number in the loop controls the number of sides, not the size.
No, the number in the loop has no effect on the shape.
Q6.
Correct this command to draw a triangle using the same size lines and angles:
repeat [fd 100 rt 120]
Correct Answer: repeat 3 [fd 100 rt 120], repeat 3 [rt 120 fd 100]