A runner going round and round the same lap of a track, with a counter ticking up one each lap instead of a whole new track being built for every lap.
Pattern recognition means noticing that something in your plan happens again and again with only a tiny change each time. Once you spot it, you stop writing the same thing over and over and say it once instead: 'do this 5 times'. Coders call that a loop. The hard part is never the loop itself - it's noticing that you're repeating yourself in the first place. That noticing is the skill.
Repeating: jump, jump, jump, jump, jump
Spotted: do this 5 times: jumpBoth do the same thing. The second one is shorter, easier to read, and - the big one - if you want 50 jumps you change one number instead of typing 45 more lines.
Mistake 1: not noticing at all, and happily copying the same line twenty times. It works, but change one thing and you have twenty edits. Mistake 2: thinking it's not a pattern because a little bit changes each time - 'clap once, clap twice, clap three times' still repeats; it's the number that's counting up.
In the app this lesson continues with the animated explanation, spoken aloud, and then the practice: Tap the card that has a repeating pattern in it - the one where a coder would stop and reach for a loop. The editor runs your child’s real code and checks the result, with their coding buddy reacting to what they wrote.
Try it free