For this project we are going to code our micro:bit to act as a magic 8 ball:
The user will think of a question such as:
- Will it be snowing tomorrow?
- Will I be a rock star one day?
- Will my program work?
Then they will shake the micro-bit. The micro-bit will than randomly pick one of the following four answers:
- No way!
- Probably!
- Unlikely!
- Definitely!
Have a go at completing the task by yourself and if you get stuck or don’t know how to get started check our solution below.
Solution
Extension Task
Tweak the code to add more possible answers such as:
- I don’t think so
- Maybe
- No doubt about it
- Not sure
Solution...
The solution for this challenge is available to full members!Find out how to become a member:
➤ Members' Area