Tutorpip← About this lessonOpen the sheet →Download PDF
Ages 8+ · Coding · Build a project
A moving sprite
1when flag clicked2go to the start3move 120 steps4turn left5move 80 steps6say Yum
Whisk's stack runs from the top down.
The big ideaA sprite follows its stack of blocks from the top down.

How it works

A sprite is a character on the stage, and blocks tell it what to do. It does nothing by itself.

A stack of blocks runs from the top to the bottom, one block at a time.

An event block, like the flag, says when the stack starts.

Each block has one job: go to puts the sprite on a spot, move walks it, turn changes the way it faces, say makes a speech bubble, and wait pauses.

FlagclickedGo to thestartMove 120stepsTurn leftMove 80steps
How Whisk reaches the fish.

Example 1: Top to bottom

  1. The stack is: flag, go to the start, move 120 steps, turn left, move 80 steps, say Yum.
  2. Whisk does the blocks in that order, one at a time.
  3. It ends at the fish and says Yum.

Example 2: How far

  1. Whisk moves 120 steps along, turns left, and then moves 80 steps up.
  2. In all it walks 120 + 80 = 200 steps.
  3. Ten steps was too tiny, and four hundred zoomed past to the edge.

Example 3: A mix-up to fix

  1. A stack has go to the start as its last block.
  2. A stack runs from the top down, so Whisk walks and then is put back at the start.
  3. The mix-up to fix: move go to the start up, under the flag block.

Example 4: Turning

  1. Whisk walks along the bottom of the stage, then turns left.
  2. Turn changes the way Whisk faces, so it now faces up the stage.
  3. The next move walks it up toward the fish.

Words to know

sprite
A character on the stage that blocks tell what to do.
stack
Blocks snapped together. It runs from the top down.
event block
A block that says when a stack starts, like the flag.
go to
A block that puts the sprite on a spot of the stage.

Watch out

Try it

  1. Which way does a stack run: top to bottom or bottom to top?
  2. Whisk moves 120 steps and then 80 steps. How many steps in all?
  3. What does a turn block change?
  4. Which block says when the stack starts?
  5. Can a sprite walk with no blocks at all?
Answers: 1. Top to bottom · 2. 200 · 3. The way the sprite faces · 4. The flag block · 5. No
Try at homeOn paper, write four blocks: when flag clicked, move three steps, turn right, move three steps. A grown-up reads them top to bottom, one block at a time. You are the sprite and do exactly what each block says, and nothing else. Then swap: you read, they walk.
For grown-upsDo the Mission: write four blocks on paper (when flag clicked, move three steps, turn right, move three steps). Read them top to bottom while your child walks them out like the sprite, doing exactly what each block says. Then swap.
Open these notes on screenScan the code, or go to tutorpip.com.