Module 2 Study Guide
Patterns Everywhere
Think Like a Coder -- Kids Coding Course -- Safaa Dabagh
1. Finding Patterns
Pattern: Something that repeats in a regular, predictable way. When you know the rule of a pattern, you can predict what comes next.
Where Can You Find Patterns?
| Where | Examples |
|---|---|
| Shapes and Colors | circle, square, circle, square... or red, red, blue, red, red, blue... |
| Numbers | 2, 4, 6, 8 (add 2) or 5, 10, 15, 20 (add 5) or 1, 2, 4, 8 (double) |
| Nature | Snowflake symmetry, honeycomb hexagons, sunflower spirals, zebra stripes |
| Music | Beats (tap tap tap), rhythms (long short short), chorus that repeats |
How to Find the Rule
- What repeats? Look for a group that shows up more than once.
- How long is the repeating part? Is it 2 items? 3 items? More?
- Can you predict what comes next? If yes, you found the rule!
Fun Fact: Honeybees build their honeycombs using hexagons (six-sided shapes) because hexagons fit together perfectly with no gaps and use the least amount of wax possible. Nature found the best pattern!
2. Completing Sequences
Three Pattern Skills
| Skill | What It Means | Example |
|---|---|---|
| Fill in the blank | Find the missing piece in the middle of a pattern | 3, 6, ___, 12 (answer: 9) |
| Extend | Figure out what comes next | 10, 20, 30, ___ (answer: 40) |
| Create | Make up your own pattern with a rule | You decide the rule! |
Types of Number Patterns
| Type | Rule | Example |
|---|---|---|
| Adding | Add the same number each time | 3, 6, 9, 12, 15 (add 3) |
| Subtracting | Subtract the same number each time | 50, 45, 40, 35 (subtract 5) |
| Doubling | Multiply by 2 each time | 1, 2, 4, 8, 16, 32 (double) |
| Halving | Divide by 2 each time | 128, 64, 32, 16, 8 (halve) |
| Fibonacci | Add the two previous numbers | 1, 1, 2, 3, 5, 8, 13 (1+1=2, 1+2=3...) |
Strategy: When there is a blank in the middle, look at the numbers on BOTH sides of the blank to figure out the rule.
Fun Fact: The Fibonacci sequence (1, 1, 2, 3, 5, 8, 13, 21...) shows up all over nature! Sunflower seed spirals, pinecone scales, and seashell curves all follow this famous pattern.
3. Why Patterns Matter
Pattern Recognition: The ability to notice similarities, repeating elements, or rules in information. It helps you make predictions and solve problems faster.
Loop: An instruction that tells the computer to repeat something a certain number of times. Loops save programmers from writing the same instructions over and over.
The Power of Loops
Without a loop (the long way):
Step forward. Step forward. Step forward. Step forward. Step forward.
That is 5 separate instructions.
With a loop (the short way):
Repeat 5 times: Step forward.
That is 1 instruction! Same result, much less work.
Step forward. Step forward. Step forward. Step forward. Step forward.
That is 5 separate instructions.
With a loop (the short way):
Repeat 5 times: Step forward.
That is 1 instruction! Same result, much less work.
Sorting and Grouping
Sorting: Organizing things by a rule (by color, size, type, date, etc.)
Grouping: Putting things together that share something in common.
Computers sort and group things all the time: emails by date, songs by artist, search results by relevance, photos by location.
How Computers Use Patterns
- Autocomplete: Predicts words as you type based on patterns in what people usually write
- Spam filters: Spots junk email by recognizing common spam patterns
- Music recommendations: Suggests songs based on patterns in what you listen to
- Weather forecasts: Uses patterns in temperature, wind, and pressure to predict weather
4. Patterns in Scratch
The Repeat Block
Repeat Block: A Scratch block (in the Control category, orange) that runs the blocks inside it a set number of times. It is a loop.
Drawing with the Pen
| Block | Category | What It Does |
|---|---|---|
| pen down | Pen (green) | Sprite draws a line wherever it moves |
| pen up | Pen (green) | Sprite moves without drawing |
| erase all | Pen (green) | Clears all drawings from the stage |
| set pen color | Pen (green) | Changes the drawing color |
| change pen color by | Pen (green) | Shifts the color a little bit (great for rainbow effects) |
| set pen size | Pen (green) | Changes how thick the line is |
| stamp | Pen (green) | Leaves a copy of the sprite on the stage |
To add pen blocks, you must click the blue "Add Extension" button in the bottom-left corner and select "Pen."
Shape Formulas
To draw any regular shape, use this formula: Turn angle = 360 / number of sides
| Shape | Sides | Repeat | Turn Angle |
|---|---|---|---|
| Triangle | 3 | repeat 3 | turn right 120 degrees |
| Square | 4 | repeat 4 | turn right 90 degrees |
| Pentagon | 5 | repeat 5 | turn right 72 degrees |
| Hexagon | 6 | repeat 6 | turn right 60 degrees |
| Octagon | 8 | repeat 8 | turn right 45 degrees |
| Circle | 360 | repeat 360 | turn right 1 degree |
Fun Fact: A circle is really just a shape with so many sides that you cannot tell them apart! In Scratch, "repeat 360: move 1 step, turn 1 degree" draws a circle by making 360 tiny straight lines.
Vocabulary Words
| Word | What It Means |
|---|---|
| Pattern | Something that repeats in a predictable way |
| Rule | The instruction that tells how a pattern works (like "add 3" or "double it") |
| Pattern Recognition | Spotting similarities or repeating elements in information |
| Loop | An instruction that repeats something a certain number of times |
| Repeat Block | The Scratch block that creates a loop |
| Sorting | Organizing things by a rule (by color, size, type, etc.) |
| Grouping | Putting things together that share something in common |
| Pen Down | Start drawing (like putting a marker on paper) |
| Pen Up | Stop drawing (like lifting the marker) |
| Stamp | Leave a copy of the sprite on the stage |
| Fibonacci Sequence | A pattern where each number is the sum of the two before it (1, 1, 2, 3, 5, 8...) |
Key Reminders
1. A pattern is something that repeats in a predictable way.
2. Every pattern has a rule that explains how it works.
3. Pattern recognition means spotting what repeats or what things have in common.
4. A loop repeats instructions. In Scratch, use the "repeat" block.
5. Loops save work by avoiding repeated instructions.
6. To draw a shape: turn angle = 360 divided by the number of sides.
7. Add the Pen extension to use drawing blocks in Scratch.
2. Every pattern has a rule that explains how it works.
3. Pattern recognition means spotting what repeats or what things have in common.
4. A loop repeats instructions. In Scratch, use the "repeat" block.
5. Loops save work by avoiding repeated instructions.
6. To draw a shape: turn angle = 360 divided by the number of sides.
7. Add the Pen extension to use drawing blocks in Scratch.
Module 2: Patterns Everywhere -- Study Guide
Think Like a Coder -- Kids Coding Course -- Safaa Dabagh -- sdabagh.github.io
© 2025