← Back to course
Code Crew G3 / Week 10 / Monday
1/6
Week 10 Β· Patterns

Monday

// What's repeating?

Monday: Meet the Idea

Rocket makes a beat. Clap, snap, clap, snap, clap, snap. Then he stops.

"What comes next?" he asks. Raven listens again. "I notice the same two sounds keep coming back," she says.

"Snap!" Raven says. Rocket cheers. Nova lights up. "Great discovery! Things that repeat can help you guess what is next." Let's find what comes next.

ROCKET clapped: clap, snap, clap, snap, clap, snap... RAVEN guessed: SNAP next! Right! Raven spotted a PATTERN. Once you see the pattern, you can PREDICT.

Big Idea
Pattern = repeats predictably.
Once you see it, you can PREDICT the next item.
Patterns let us write LOOPS for them (Week 2!).

Find the Rule

Every pattern has a RULE. The rule tells you what comes next.

To find it, look at what repeats or what changes each time.

WHAT COMES NEXT?
  • Read the question.
  • Tap your answer.
red, red, blue, red, red, blue, ... What comes next?
2, 4, 6, 8, ... What comes next?
What is the rule for 5, 10, 15, 20?
up, down, up, down, ... What is item 7?
A, B, B, A, B, B, A, ____
10, 20, 30, 40, ____
1, 1, 2, 1, 1, 2, 1, 1, ____
StatementTrue or false?
A pattern repeats in a way you can predict.?
1, 2, 3, 1, 2, 3 is a pattern.?
A pattern never has a rule.?
If you know the rule, you can predict what comes next.?
WHY THIS EXERCISESpotting patterns is a big part of computer science.
PUT THE GROWING PATTERN IN ORDER
  • ?7 dots
  • ?1 dot
  • ?5 dots
  • ?3 dots
WHY THIS EXERCISEA growing pattern changes by the same amount each time.
clap, snap, snap, clap, snap, snap, ... What is the 9th sound?
WHY THIS EXERCISEKnowing the lap length lets you jump ahead without guessing.
Try it
Make a pattern with spoons and cups on the table.
Ask a grown-up to say what comes next.
Then make a trickier pattern.

Quick Try

What comes next in each pattern?

A B A B A B ____
1 2 3 1 2 3 1 ____
β˜… β˜† β˜… β˜… β˜† β˜… β˜… β˜… β˜† ____