Search this site
Embedded Files
Skip to main content
Skip to navigation
Sec 1 Coding 2018
Home
Class 1/1
Lesson 1: Introduction
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
Lesson 12
Lesson 13
Class 1/2
Lesson 1: Introduction
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
Lesson 12
Lesson 13
Class 1/3
Lesson 1: Introduction
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
Lesson 12
Class 1/4
Lesson 1: Introduction
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
Lesson 12
Class 1/5
Lesson 1: Introduction
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
Lesson 12
Sec 1 Coding 2018
Lesson 12
Games
The micro:bit can be used to create games. Let's create the Maths game.
Task 1
Program the micro:bit to create an addition game. It will display 2 random numbers.
The first number will be from 0 - 5 and the second number will be from 0 - 4.
When Button A is pressed, micro:bit will display the question.
The user will press Button B to find the answer.
Every time Button B is pressed, the number displayed is increased by 1.
If the number is more than 9, it will restart from 0.
The user will enter the answer by pressing both Button A and B.
If the answer is correct, right icon will be diplayed.
If the answer is incorrect, wrong icon and the correct answer is displayed.
Then, "NEXT" is displayed and the micro:bit will continue to the display the next question.
Task 2
Extension from the game from Task 1.
Shake the micro:bit to display the total Score.
Report abuse
Report abuse