Count-controlled loops
Lesson details
Learning outcome
I can modify a count-controlled loop to produce a given outcome.
Key learning points
- Changing the number of repetitions in a count-controlled loop changes the outcome.
- The outcome of a program containing a count-controlled loop can be predicted.
- 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.
Teacher tip
In Logo, the exterior angle is used when calculating the turn required to create different shapes. Pupils often mistakenly use the interior ange. This is best modelled on a whiteboard by showing the relationship to a straight line of angle 180 degrees and the internal angle.
Equipment
Pupils need access to a device with software that can execute Logo programs. Examples in this lesson use FMSLogo https://oak.link/fms-logo
Licence
Lesson video
Loading...
Prior knowledge starter quiz
6 Questions
Q1.What does the repeat command do in a program?
Q2.What is a count-controlled loop?
Q3.What is an algorithm?
Q4.What happens if you change the value of a command?
Q5.What does the home command do in a turtle program?
Q6.What is the term for the rules about how a programming language should be written?
Assessment exit quiz
6 Questions
Q1.What does the fd command control in a program?
Q2.What is the relationship between a loop's number and its outcome?
Q3.What is the term for carefully following a program to predict its outcome?
Q4.Put these steps in order to trace a program.
Q5.Does a loop with a high number always create a big shape?
Q6.Correct this command to draw a triangle using the same size lines and angles: repeat [fd 100 rt 120]
To help you plan your 4 computing lesson on: Count-controlled loops, download all teaching resources for free and adapt to suit your pupils' needs...
To help you plan your 4 computing lesson on: Count-controlled loops, download all teaching resources for free and adapt to suit your pupils' needs.
The starter quiz will activate and check your pupils' prior knowledge, with versions available both with and without answers in PDF format.
We use learning cycles to break down learning into key concepts or ideas linked to the learning outcome. Each learning cycle features explanations with checks for understanding and practice tasks with feedback. All of this is found in our slide decks, ready for you to download and edit. The practice tasks are also available as printable worksheets and some lessons have additional materials with extra material you might need for teaching the lesson.
The assessment exit quiz will test your pupils' understanding of the key learning points.
Our video is a tool for planning, showing how other teachers might teach the lesson, offering helpful tips, modelled explanations and inspiration for your own delivery in the classroom. Plus, you can set it as homework or revision for pupils and keep their learning on track by sharing an online pupil version of this lesson.
Explore more key stage 2 computing lessons from the Repetition in programs unit, dive into the full primary computing curriculum, or learn more about lesson planning.