15
Lesson 15 of 20 · Patterns
Patterns — Part 4
Spot and copy patterns. What comes next? This is part 4 of 20.
What you'll learn
You will learn to spot repeating patterns in code and predict what comes next.
Steps
- 1Look at the code. Can you see a pattern? The output alternates: A, B, A, B.
- 2Patterns repeat in a predictable way. If the pattern continues, the next output would be A, then B again.
- 3Spotting patterns is a superpower in coding — when you see something repeat, you can use a loop to save time.
- 4Think of a pattern you see every day (like day/night or red/green traffic lights). Coding uses patterns the same way!
Key Terms
- Pattern
- Something that repeats in a predictable way (e.g. A, B, A, B).
- Repeat
- To do or show the same thing again.
- Predict
- To guess what comes next based on what you've seen.
Python 3
Output
Loading Python... This may take a few seconds.
Your code runs only in your browser. No code is sent to any server. Stay safe and have fun learning!
Ready?
Patterns — Part 4
You will learn to spot repeating patterns in code and predict what comes next.
Full screen — no distractions
🖨️View in Shop
Checkout complete lesson on Patterns for Kindergarten
Get the full Patterns track as a printable PDF — all lessons, worksheets, and answer keys.
