Scoring We will display a score which will increase when we press button A Add a button A pressed do’ loop ‘on Because the score changes this is called a variable. Add a Variable, item by 1’ ‘change At the moment the variable is called Change this to by renaming the variable ‘item’. ‘score’ We now need to show this score on the microbit. The score is a number. Add in show number Change the number to be the score variable Now every time you press button A the score should display and go up by 1 Challenge Make button B make the score go down Reset the score to 0 by shaking the microbit Answers
Scoring We will display a score which will increase when we press button A Add a ‘on button A pressed do’ loop Because the score changes this is called a variable. Add a Variable, ‘change item by 1’ At the moment the variable is called ‘item’. Change this to ‘score’ by renaming the variable We now need to show this score on the microbit. The score is a number. Add in show number Change the number to be the score variable Now every time you press button A the score should display and go up by 1 Challenge Make button B make the score go down Reset the score to 0 by shaking the microbit Answers
microbit-lesson-6-counter.docx