AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Variables and values

Week 8 · Unit 4: Be a storyteller · 3 lessons
Answers are for parents and teachers.
1
Think of a game that you play. List three variables that the game must keep track of, and give each a clear name.
2
A program asks for the user’s favourite animal and stores it in a variable. Write a name for the variable and the algorithm in 5 steps.
3
Trace this program: set score to 10; change score by −4; change score by 6; change score by −2. What is the final value?
4
Make a variable jar at home from a cup and slips of paper. Show a family member how the value changes while the label stays the same.
5
(if you have a computer or tablet) In Scratch, make a variable called stars. Make a sprite that adds 3 to it when clicked. Test it. Is the value what you traced?