π’ 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
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
Cat walks across, then speaks.
Talk, then move
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.
Watch what a pause does to a knock-knock joke:
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:
- Start with when π© clicked (Events).
- Add go to x: 0 y: 0 (Motion) so it always starts centered.
- Add say βHi, I'm Scratchy!β for 2 seconds (Looks).
- Add wait 1 seconds (Control).
- Add move 120 steps (Motion), then 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
- Tell your child: "I'm a robot. I only do exactly what you say, one instruction at a time."
- 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.
- 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.