Skip to main content

πŸ”’ Lesson 2.1: Sequences & Timing

The most fundamental idea in all of coding is deceptively simple: computers do things in order. This lesson makes that idea concrete β€” and adds the "pause" button that turns a rushed jumble into a performance.

🎯 Learning Objectives

  • Explain what a sequence is and why order matters
  • Use the wait block to control timing and pacing
  • Build a short multi-step routine that runs like a little performance
  • Help your child predict and debug "wrong order" bugs

Estimated Time: 30 minutes  β€’  Builds on: Module 1

Ages 5–7 (with help) Ages 8–11 Ages 12+
In This Lesson

πŸŽ“ Learn It: What a sequence is

A sequence is just a list of steps carried out one after another, top to bottom. You already built one in Module 1. Computers are wonderfully obedient and completely literal: they do exactly what you stack up, in exactly that order β€” no guessing what you meant.

Think of a recipe: "crack the eggs, then whisk, then pour." Swap steps and breakfast goes sideways. Code is the same.

A sequence is a recipe the computer follows to the letter. If it does something odd, it's usually following your recipe correctly β€” the recipe just isn't what you intended yet.

πŸŽ“ Learn It: Order changes everything

Here are two scripts with the same blocks in a different order. They behave completely differently:

Move, then talk

when βš‘ clicked
move 100 steps
say Made it! for 2 seconds

Cat walks across, then speaks.

Talk, then move

when βš‘ clicked
say Here I go! for 2 seconds
move 100 steps

Cat speaks first, then walks.

βœ… Try the experiment

Build one, run it, then drag the blocks to swap their order and run again. Feeling the difference is worth more than reading about it.

πŸŽ“ Learn It: The wait block (your pacing tool)

Computers are fast β€” often too fast. Without pauses, several actions blur into one instant. The β€œwait 1 seconds” block (from the orange Control category) is how you add breathing room, comic timing, and drama.

The Control category palette showing blocks including 'wait 1 seconds', 'repeat 10', 'forever', 'if then', and 'if then else'.
Figure 1: The Control palette. The wait block is right at the top.

Watch what a pause does to a knock-knock joke:

when βš‘ clicked
say Knock knock! for 2 seconds
wait 1 seconds
say Who's there? for 2 seconds
wait 1 seconds
say Boo! for 2 seconds

Remove the waits and it still "works" β€” but the timing falls flat. Timing is where a project starts to feel alive.

πŸ› οΈ Try It: Build a greeting routine

Let's make the cat perform a little four-beat welcome. Open a fresh project and build this on the cat:

  1. Start with when 🟩 clicked (Events).
  2. Add go to x: 0 y: 0 (Motion) so it always starts centered.
  3. Add say β€œHi, I'm Scratchy!” for 2 seconds (Looks).
  4. Add wait 1 seconds (Control).
  5. Add move 120 steps (Motion), then say β€œWelcome to my world!” for 2 seconds.
when βš‘ clicked
go to x: 0 y: 0
say Hi, I'm Scratchy! for 2 seconds
wait 1 seconds
move 120 steps
say Welcome to my world! for 2 seconds
πŸ’‘ Challenge: add a sound and a costume change

Between the wait and the move, add start sound Meow (Sound) and next costume (Looks). Now it greets, meows, and its legs shift as it walks off. Six blocks, one little show.

πŸ’¬ Teach It: The "robot game"

Sequences click into place fastest away from the screen, with a game kids adore: you become the robot.

How to play

  1. Tell your child: "I'm a robot. I only do exactly what you say, one instruction at a time."
  2. Ask them to give you steps to, say, make a peanut-butter sandwich β€” and follow them literally. "Put peanut butter on the bread" β†’ put the whole jar on the loaf.
  3. Let them laugh, then refine their instructions until it works. That's debugging a sequence!

"Remember: the computer is a robot just like I was. It's not being silly on purpose β€” it's doing your steps exactly. So if it looks wrong, let's read our steps in order and find the mix-up."

πŸ‘§ Ages 5–7

The robot game is the lesson. On screen, three blocks is plenty. Let them pick the words and the wait times.

πŸ§’ Ages 8–11

Have them predict before pressing GO: "What happens first?" Prediction turns watching into thinking.

πŸ§‘ Ages 12+

Challenge them to time a two-sprite conversation using only waits. It's a great primer for loops next lesson.

⚠️ Common kid bug

They put a say for 2 seconds before a move and wonder why the cat "waits." It's not stuck β€” that block holds for 2 seconds by design. Point out the words "for 2 seconds" and let the penny drop.

🎯 Quick Check

Question 1: What is a "sequence" in coding?

Question 2: Which category holds the wait block?

Question 3: Your child's cat "freezes" for two seconds mid-routine. Most likely reason?

Summary & What's Next

πŸŽ‰ Key Takeaways

  • A sequence runs top-to-bottom; order changes behavior.
  • The wait block (Control) controls pacing and timing.
  • Computers follow your steps literally β€” most "bugs" are a recipe mix-up.
  • The off-screen "robot game" teaches sequencing better than any lecture.

πŸš€ Next up

Copy-pasting the same block ten times is nobody's idea of fun. In Lesson 2.2 we meet loops β€” the blocks that repeat actions for you β€” and finally make the cat truly walk.