Offline activities · Quest 5
Variable boxes
Turn cups or envelopes into variables and watch their values change.
15 minutes
You will need
- Three cups or envelopes
- Sticky notes or paper slips
- A pen
What to do
- Label the cups score, lives and name.
- Put a slip in each: score = 0, lives = 3, name = a made-up hero name.
- A helper reads orders such as “score = score + 5” and you change the slip.
- Try “lives = lives - 1” three times. What happens at 0?
- Write your own three orders and swap with the helper.
Talk about it
- Why does the old value disappear?
- When would a game need a lives variable?
