🐱 Scratch for Kids · Lesson 6 of 7

Variables: score and time

Google Classroom

Count apples, and a 30-second timer.

What is a variable?

A variable is a box with a name that holds a number (or text) that can change. In Variables (orange-red), click “Make a Variable” and name it “Score”. It appears on the stage.

Keeping score

  1. At the start: “set Score to 0”
  2. When the apple touches the basket: “change Score by 1”
  3. Optional: when the apple is missed, “change Score by -1”

A 30-second timer

  1. Make another variable: “Time”
  2. On the stage (or the basket): when green flag clicked → set Time to 30
  3. repeat until Time = 0 → wait 1 second → change Time by -1
  4. Then: say “Game over! Score: ” join Score → stop all

Tip

💡 The “join” block (Operators) glues text and numbers together: join “Score: ” and Score.

✏️ Practice: your turn

  1. Make a Score variable that goes up with each apple
  2. Reset the score to 0 at the start
  3. Add a 30-second timer
  4. Show “Game over” with the score at the end

✏️ Open the Scratch editor (free, in the browser) ↗

🧠 Quick quiz

Answer all 4 questions correctly to mark this lesson as done.

1. What is a variable?
2. Why “set Score to 0” at the start?
3. Which block adds 1 to the score?
4. What does “join” do?

0 of 4 correct