Rock, paper, scissors
Lesson 6 of 6
MakeCode
7-11 yrs
Combine skills from the previous lessons to turn your micro:bit into an electronic simulation of a popular game of chance.
Key learning:
- Use the accelerometer via the ‘on shake’ block to start the code running.
- Code the creation of random numbers in a fixed range.
- Use variables so they can be tested using logic.
- Make use of more complex logical ‘if… then… else if…’ conditional instructions.
- Apply these concepts to make a computer simulation of a real-world game.
- Evaluate the fairness of computer simulations.
Computer systems:
Input/output
Sensors
Programming:
Randomisation
Selection