SLIDE 5 11/04/2017 5
Tools Description of tools
- When button B is pressed, the variable
“Messages” will be set to pick either number 0 or 1.
- If number 0 is selected, the message
“Hello!” will appear.
- If the number 1 is selected, the message
“Bye!” will appear.
How do we use t he r an dom fun ct ion in Micr obit ?
If we want the Microbit to display some messages at random, this is how we can do it.
CHALLENGE
- Usi ng t he t ool s t hat you have been i nt r oduced t oday, com
e up wi t h a Sci ssor , Paper , St one gam e wi t h t he M i cr obi t .
hen shaken, show t he 3 pr eset i m ages of Sci ssor , Paper or St one r andom l y.
hen but t ons A and B ar e pr essed, cl ear t he scr een.