Overview
In this hands-on activity, kids use colored blocks or LEGO bricks to follow visual pattern cards, then extend those patterns to discover how loops work in real life. They're not coding on a screen—they're physically building sequences that repeat, which is exactly what loops do in programming.
This project introduces sequencing (the order of actions), pattern recognition, and the concept that doing the same thing over and over is called a loop. By the end, kids will understand why programmers use loops to save time and create organized, predictable outcomes.
What You'll Learn
- Loops: actions or sequences that repeat
- Sequences: the order in which things happen
- Pattern recognition: spotting what repeats
- Prediction: using patterns to guess what comes next
Background
Loops are one of the fundamental ideas in programming. A loop tells a computer to repeat an action a set number of times or until something changes. Think of brushing your teeth: rinse, brush top, brush bottom, brush sides—that's a sequence. If you repeat the whole thing three times, that's a loop. Kids naturally understand repetition, and building patterns with blocks makes that invisible concept visible and tactile.
Pattern recognition is also how our brains start to understand the world. When kids spot that 'red-blue-red-blue' repeats, they're thinking like programmers already. They're asking: What comes next? Is there a rule? Can I predict it? These are programming questions dressed up as block play.
This activity works because there's no screen, no pressure, and immediate visual feedback. Kids can see their mistake right away if they place the wrong color, and they can fix it. That's the same kind of debugging programmers do every day.
Safety note: Check LEGO bricks for small loose pieces if using with younger children at the 5-year-old end of the range; supervise accordingly. No choking hazards if using larger blocks like Mega Bloks or wooden blocks.
Materials
Everything on this list is either free or available at a dollar store. No lab equipment required.
Step-by-Step Procedure
-
1
Create Pattern Cards
Before the activity, make 4-6 pattern cards on index cards. Draw colored squares (about 1 inch each) in repeating patterns. Start simple: Red-Blue-Red-Blue-Red-Blue. Then try: Red-Blue-Yellow-Red-Blue-Yellow. Make one with 4 blocks that repeat: Green-Purple-Orange-Yellow-Green-Purple-Orange-Yellow. Use thick markers so the colors are clear, and leave 2 inches of blank space below each pattern—this is where kids will extend it.
If you want these cards to last, tape clear packing tape over them or use lamination sheets. Store them in a small envelope or box. You can also photograph them and print new copies later. The key is making them big and colorful enough that a 5-year-old can see them clearly from across a small table.💡Draw 3-4 complete repetitions of the pattern, not just one cycle. Kids need to see it repeat 2-3 times before the rule becomes obvious.
-
2
Set Up Your Station
Clear a table or use the floor—whatever works in your space. Arrange blocks by color in separate piles or small containers. A muffin tin, egg carton, or small bowls work great for sorting. Lay out your pattern cards in the order you'll use them, starting with the easiest (2-color simple pattern) and building to harder ones (3-4 colors).
Test one pattern yourself quickly before kids arrive. Just to make sure your pattern card is clear and the blocks match the colors you drew. If you used a red that looks different in person than on the card, swap blocks or redraw the card. This takes 2 minutes and saves frustration.💡If kids are working in pairs, give each pair their own set of blocks so there's no fighting over colors.
-
3
Introduce the Idea with a Demo
Sit down with your first pattern card—the simplest one, usually 2 colors. Point to the card and say something like: 'Look at these blocks on the card. Can you see the colors? Red and blue. Red and blue. What comes next?' Let kids call it out, even if they're wrong the first time. Place the blocks as a physical line in front of the card, mirroring what's drawn.
Once you've done 3-4 blocks following the card, pause and ask: 'What do you notice? Is there a pattern? What should come next?' This activates their pattern-spotting brain before they try it themselves. Use the word 'loop' here: 'It loops—it does the same thing over and over.'💡Keep your demo to under 2 minutes. Kids want to build, not watch.
-
4
Kids Follow the Pattern
Give a child or pair of children one pattern card and a pile of blocks. Their job: place blocks in the exact order shown on the card. This is intentionally simple the first time—they're learning how to read the visual instructions. As they place each block, narrate what they're doing: 'You put a red block. Then a blue block. Now what comes next according to the card?'
If they make a mistake, don't jump in immediately. Ask: 'Does that match the card?' Usually they'll self-correct. If not, gently move the wrong block aside and ask them to look again. This is debugging—a core programming skill. Once they finish matching all the blocks on the card, celebrate. They just followed an algorithm (a set of instructions).💡Some kids will race and place blocks without looking at the card. That's okay. Gently redirect: 'What color is next on the card?' If they're struggling, sit next to them and point to each color on the card as they place the block.
-
5
Extend the Pattern
Now the real learning happens. Point to the space below where the pattern ends on the card. Say: 'The pattern stops here, but I think it keeps going. What should come next? What block comes after the blue?' Kids should recognize that the pattern repeats—it loops back to the beginning.
Let them extend the pattern on their own for 2-3 more blocks (one full cycle repeat). They're now predicting and building. If they get it right, they'll smile—they figured out the rule. If they get it wrong, ask: 'Does that match what we already built? Look at the first blocks you placed. What was first? Second?' This helps them see the pattern they just built and realize their extension doesn't match.💡Extending is harder than following. If a kid struggles, extend it together. 'The pattern is red, blue. Let's do it again: red, blue. What comes next?'
-
6
Move to a New Pattern
Once they've extended the first pattern, pull out the next card. This one might have 3 colors or a longer sequence. Repeat steps 4 and 5: follow the pattern, then extend it. Kids often become much faster and more confident on the second pattern. They've cracked the code—they know to look for what repeats.
If you have time and energy, let kids create their own pattern card. They pick 2-3 colors and design a repeating sequence on a blank index card (you might need to guide them to actually make it repeat and not just draw random colors). Then they build it with blocks. This is the highest level of engagement: they're both the designer and the builder.💡If a child finishes early, challenge them: 'Can you make a pattern that repeats 4 times instead of 3?' or 'Can you trade cards with a friend and try theirs?'
-
7
Reflect and Connect to Real Life
At the end, gather everyone and ask reflection questions: 'What was easy? What was tricky? Did you predict any patterns correctly? What's a pattern you see in this room? In your home?' Kids will start noticing patterns everywhere—tiles on the floor, stripes on clothes, the days of the week. This is them recognizing that patterns and loops are real, not just block activities.
You might also say: 'You know what? Programmers use loops all the time. If a game needs a character to walk left, right, left, right over and over, the programmer doesn't write that 100 times. They write it once and tell the computer to loop—to repeat it. That's what you just did with these blocks.' Suddenly the blocks have power; they're thinking like programmers.💡Keep this reflection short and celebratory. You're planting seeds, not lecturing. Kids remember feelings more than facts.
Expected Results
Kids will successfully follow at least one 4-6 block pattern from a card and extend it for 2-3 more repetitions. They'll be able to point to the repeating part and say things like 'it goes red, blue, red, blue again' or 'then it starts over.' Some will even create their own patterns for a partner to follow.
You'll notice they start thinking about prediction. They'll hesitate before placing the next block, then confidently say 'it should be green because that's what comes next.' That moment—when they recognize the rule—is when the loop concept clicks. They may also spot patterns in their environment (the stripes on a shirt, the fence slats), which shows the concept is sticking.
Your results may differ — and that's valuable data, not a mistake. Document what you actually observed, not what you expected.
Going Further
Code a Robot (No Screen)
Take the pattern concept to movement. One child is the 'robot' and follows a sequence of physical moves you call out: 'Hop, clap, spin. Hop, clap, spin. Hop, clap, spin.' Kids watch and can predict the next move. Then reverse it: kids create a 3-move sequence and you or a partner follow it. This bridges patterns into algorithms and real-world programming (where instructions control what things do). You can make it harder by asking: 'If the robot does this loop 5 times, how many hops happen?' (count: 5). Now you're also introducing loops and multiplication without math worksheets.
Pattern Symmetry Challenge
Introduce the idea of symmetrical patterns—patterns that look the same when you flip or mirror them. Give kids a card with a symmetrical pattern (Red-Blue-Red-Blue-Red or Yellow-Purple-Yellow-Purple-Yellow) and ask them to build it. Then, ask: 'If I flip this pattern, does it look the same?' Build a mirror copy next to the original. This introduces symmetry, a concept in math and nature, while using the same loop-building skills. Kids start seeing that some patterns are balanced, which is both a programming and design concept.
Hunt for Patterns in Your World
Take kids on a 'pattern hunt' around your home, classroom, or outdoor space. Give them a clipboard and pencil (or just their eyes) and challenge them to find 5 patterns: maybe the fence slats, the tiles on a wall, the petals on a flower, the stripes on a shirt, the way leaves are arranged on a branch. Take photos if possible. Back at the base, recreate one pattern with blocks. This shows kids that loops and patterns aren't just activities—they're fundamental to how things are organized in nature and human-made spaces. It also builds observation skills and connects STEM to the real world.