Patterns and repetition — Computing, 4–6 years
A repeated instruction can be noticed as a pattern. Naming the pattern helps us make longer sequences without saying every step.
Do it again
Some computer instructions happen again and again, such as moving two steps and turning. We can describe the repeated part once, then say how many times to use it. This is a pattern.
Why repeat a name?
Writing the same instruction many times takes space and makes mistakes easier. A repeat instruction keeps the plan short and clear. It solves the problem of telling a machine the same thing over and over.
Make a square
A toy robot can draw a square with this pattern: move forward three squares, turn right. We repeat the pattern four times. Four equal sides and four turns bring the robot back to its starting place.
Repeating too much
Seeing a pattern can make us want to repeat it forever. But a plan usually needs a stopping point, such as four sides for a square. The mistake is reasonable because the repeated part feels like the whole task.
Patterns in machines
Traffic lights repeat a sequence of colours, and washing machines repeat planned movements. Songs and dances also use repeated parts. Spotting repetition helps us predict what comes next and give shorter instructions.
Keep exploring
Other languages
Loading MyLeoNes™…