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

Light show project

Week 29 · Unit 7.6: Sequencing and pattern recognition · 3 lessons
Answers are for parents and teachers.
1
Write the program lines for a sequence of three images: all the lights in row 1 on at 9, then all the lights in row 3 on at 9, then all the lights in row 5 on at 9. Use 300 milliseconds for each wait and clear the screen at the end.
2
A light shines at brightness 2, then 5, then 9, then goes off. Write the first row of each image if the light is the centre light of row 1.
3
Copy the table and put the lines in the right order for a program that shows a heart for 1 second, then a small heart for 2 seconds, and then clears. Write the letters in order.
LetterLine
Asleep(1000)
Bfrom microbit import *
Cdisplay.clear()
Ddisplay.show(Image.HEART_SMALL)
Edisplay.show(Image.HEART)
Fsleep(2000)
4
Look at the flowchart. The sub-routine Blink shows a heart for 0.5 second and then clears the screen. How many times does the lamp blink? Why is a sub-routine useful here?
Startrun sub-routine: Blinkwait 1 secondrun sub-routine: BlinkEnd
5
What can you do? Write one sentence for each: (a) explain what a prototype is; (b) explain AND, OR and NOT; (c) write a picture on the micro:bit as rows of 0 and 9; (d) explain how a test plan helps.