← Back to course
Code Crew G3 / Week 04 / Friday
5/6
Week 04 Β· Variables

Friday

// Boxes that hold things

Friday: Mini-Project

Rocket builds a dashboard on his tablet. "Let's track my whole day!" he says.

He adds boxes for steps, snacks, and books read. Each box has a name and a value.

Raven peeks at the screen. "What do you notice about which ones change?" she asks.

Nova sparkles. "Pick names that tell what is inside," she says. Let's choose four things to track and write today's values.

My Personal Dashboard

Pick 4 things about your day to TRACK as variables. Give each a name.

Write the value for today.

1. __________________ = __________
2. __________________ = __________
3. __________________ = __________
4. __________________ = __________

Reflection

Dashboard Check

TRACK YOUR DAY
  • Read the question.
  • Tap your answer.
steps_today starts at 0. Raven walks 20 steps, then 30. What is steps_today?
cups_of_water = 1. Rocket drinks 3 more cups. What is cups_of_water?
Which of these changes from day to day?
pages_read = 12. Raven reads 8 more pages. What is pages_read?
books = 3. Then books = books + 2. What is books?
Then books = books - 1. What is books now?
Then books = 10. What is books now?
StatementTrue or false?
A dashboard can show many variables at once.?
A variable that stays the same can still be useful.?
pages_read = pages_read + 8 adds 8 pages.?
books = 10 adds 10 to the old value.?
WHY THIS EXERCISEKnowing add from replace is the key to box math.

Quick Check

Raven tracks a variable named steps_today. It starts at 0. She walks 10 steps. Then she walks 5 more. What is steps_today now? ____
WHY THIS EXERCISEA step counter could keep a variable and add to it all day. The name stays the same while the value grows.
← Thursday