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

Variables hold data

Week 8 · Unit 4: Variables in programming · 3 lessons
Answers are for parents and teachers.
1
Choose four things in your home and describe each one as a variable. Write a name, a value and a data type, for example: pencilsInCup, 5, integer.
2
What is the data type of each? (a) 1200, (b) tiger, (c) M, (d) hello world, (e) 0.
3
Draw a flowchart that asks for your favourite colour, stores it in a variable called favColour and says Nice choice and the colour.
4
Write a trace table for: set a to 6, set b to 4, set c to a − b, change a by 2.
5
Explain to a family member the difference between set and change by, using a jar of coins as an example.