Computing KS2: Repetition
This short film for primary schools explains how repetition within computing allows a command to be repeated to make a computer program more efficient.
The film introduces a simple program that moves an animated robot across a screen and uses flow diagrams to show how adding a repeat command makes the program more efficient.
The idea of repeat loops are introduced, with fixed loops explored using the example of a digital printer. The use of 'until' in a repeat loop is also explored.
The film finishes by explaining how introducing a question into a repeat loop, to form a conditional loop, makes complex programs more efficient.
This short film is from the BBC Teach series, Cracking Computing.
Teaching Notes
Real world analogies are a great way to start exploring repetition in programming as they emphasise the way that using repetition language makes a process more efficient.
Identifying real world examples of repeat loops, like a printer, are also a good way to focus pupils on the way we use technology every day and its impact on our lives.
Programming a physical system or simulation like a flashing warning light is also a good way to learn about repetition loops, how they are programmed and what the outcomes look like.
Another good way to introduce repetition is by using a simple programming language like Logo to draw shapes with repeated elements. For example, a square can be created by repeating the element: “forward 10 steps, right 90 degrees” four times.
Other subjects
Maths: Writing instructions for drawing regular shapes is a great way to start thinking about repetition. Once pupils are confident with writing the instructions in English, they could then move to writing them in a programming language like Logo or Scratch.
Art & design: The creation of repeated patterns using motifs and pattern elements is an important part of the decorative arts for things like wallpaper and textile design. Using a computer program to automate this repeat process is a good way to apply this concept to a real-world example.
Curriculum Notes
This short film is suitable for teaching:
- KS2 computing curriculum in England
- Technologies curriculum area at 2nd Level in Scotland
- KS2 digital competence framework in Wales
- KS2 using ICT cross-curricular skill in Northern Ireland