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

If, then, else

Week 19 · Unit 8: Be an innovator · 3 lessons
Answers are for parents and teachers.
1
Write three if … then … else sentences about your day. Underline the condition and circle the ‘else’ part.
2
A variable called pick is set to a random number from 1 to 3. The program says ‘Yes!’ if pick = 2, and ‘No’ otherwise. What can it say, and how often is it ‘Yes!’? Roll a die and use 1–2 for 1, 3–4 for 2 and 5–6 for 3 to test it 12 times.
3
True or false? (a) 15 = 15, (b) 3 + 4 = 8, (c) 20 = 2 × 10, (d) cat = hat
4
Draw a micro:bit with a 5 × 5 grid and show a happy face with the lights.
5
Explain to a grown-up what the ‘else’ part of an if … then … else block does, using an example.