Skip to content

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

Lesson plan preview

Slides preview

Student handouts

Completed lesson code

This provides an example of the code created during this lesson.

You may also be interested in

Unit of work

Nature art

This unit of four lessons is suitable for students aged 7-8 years. They create nature representations, firstly using art materials and are introduced to computational thinking and programming the LEDs on the BBC micro:bit. 

Make it: code it

Name badge

Turn your micro:bit into an animated name badge