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?

WhereExamples
Shapes and Colorscircle, square, circle, square... or red, red, blue, red, red, blue...
Numbers2, 4, 6, 8 (add 2) or 5, 10, 15, 20 (add 5) or 1, 2, 4, 8 (double)
NatureSnowflake symmetry, honeycomb hexagons, sunflower spirals, zebra stripes
MusicBeats (tap tap tap), rhythms (long short short), chorus that repeats

How to Find the Rule

  1. What repeats? Look for a group that shows up more than once.
  2. How long is the repeating part? Is it 2 items? 3 items? More?
  3. 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

SkillWhat It MeansExample
Fill in the blankFind the missing piece in the middle of a pattern3, 6, ___, 12 (answer: 9)
ExtendFigure out what comes next10, 20, 30, ___ (answer: 40)
CreateMake up your own pattern with a ruleYou decide the rule!

Types of Number Patterns

TypeRuleExample
AddingAdd the same number each time3, 6, 9, 12, 15 (add 3)
SubtractingSubtract the same number each time50, 45, 40, 35 (subtract 5)
DoublingMultiply by 2 each time1, 2, 4, 8, 16, 32 (double)
HalvingDivide by 2 each time128, 64, 32, 16, 8 (halve)
FibonacciAdd the two previous numbers1, 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.

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

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

BlockCategoryWhat It Does
pen downPen (green)Sprite draws a line wherever it moves
pen upPen (green)Sprite moves without drawing
erase allPen (green)Clears all drawings from the stage
set pen colorPen (green)Changes the drawing color
change pen color byPen (green)Shifts the color a little bit (great for rainbow effects)
set pen sizePen (green)Changes how thick the line is
stampPen (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

ShapeSidesRepeatTurn Angle
Triangle3repeat 3turn right 120 degrees
Square4repeat 4turn right 90 degrees
Pentagon5repeat 5turn right 72 degrees
Hexagon6repeat 6turn right 60 degrees
Octagon8repeat 8turn right 45 degrees
Circle360repeat 360turn 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

WordWhat It Means
PatternSomething that repeats in a predictable way
RuleThe instruction that tells how a pattern works (like "add 3" or "double it")
Pattern RecognitionSpotting similarities or repeating elements in information
LoopAn instruction that repeats something a certain number of times
Repeat BlockThe Scratch block that creates a loop
SortingOrganizing things by a rule (by color, size, type, etc.)
GroupingPutting things together that share something in common
Pen DownStart drawing (like putting a marker on paper)
Pen UpStop drawing (like lifting the marker)
StampLeave a copy of the sprite on the stage
Fibonacci SequenceA 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.

Module 2: Patterns Everywhere -- Study Guide

Think Like a Coder -- Kids Coding Course -- Safaa Dabagh -- sdabagh.github.io

© 2025