Boards that decide
Answers are for parents and teachers.
1
Draw two 5 × 5 grids and shade the lights of a smile and a frown for a board that shows the smile when A is pressed and the frown when it is not.
One possible smile: 00000, 01010, 00000, 10001, 01110. One possible frown: 00000, 01010, 00000, 01110, 10001.
2
The program is: forever, if button A is pressed then show a heart, else show a duck. In five checks A is pressed, pressed, not, not, pressed. What does the board show?
Heart, heart, duck, duck, heart.
3
Explain to a grown-up why counting with a forever loop and no pause can give a very large number for one press.
The loop checks the button very fast. While the button is held down, the condition is true at every check, so the counter goes up many times.
4
Write a rule with the light level: if the level is below 40 show the asleep icon, else show the happy icon. What does the board show for 39, 40 and 200?
39 shows the asleep face. 40 shows the happy face, because 40 is not below 40. 200 shows the happy face.
5
(if you have a computer or tablet) In a micro:bit simulator, build the answer board with an else part. Press the button and check that the tick goes away when you let go.
The program works when the screen clears or shows the cross as soon as the button is released.