Rock, Paper, Scissors

In today's lesson we looked at random numbers. Random numbers are useful for all sorts of things, including probability experiments, but they are particularly useful to add some unpredictability to games and simulations.

Your Task

Your task is to use randomness to make a game. My idea is Rock, Paper, Scissors, but you could do something else if you prefer. Your program should:

  1. be user-friendly - it should be obvious to the user what they need to do

  2. correctly implement the rules of the game - the computer should behave as expected and shouldn't cheat

  3. include random behaviour - it shouldn't do exactly the same thing every time

Extension

You might like to use other things you've learnt in the programming course - e.g. you could offer the player a number of goes, use a variable to keep the score, etc.