![](https://cdn.sanity.io/images/ajwvhvgo/production/20f7fa0943dbde155238a989c3de865264d19812-1920x1080.jpg?rect=240,0,1440,1080&bg=fff&w=400&h=300&q=90&fit=min&auto=format)
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