A- A A+

Fruit Machine Python Code Challenge.

 

 

Write a program to simulate a Fruit Machine that displays three symbols at random from

 

  • Cherry, Bell, Lemon, Orange, Star, Skull.
  • The player starts with £1 credit, with each go costing 20p.
  • If the Fruit Machine “rolls” two of the same symbol, the user wins 50p.
  • The player wins £1 for three of the same and £5 for 3 Bells.
  • The player loses £1 if two skulls are rolled and all of his/her money if three skulls are rolled.
  • The player can choose to quit with the winnings after each roll or keep playing until there is no money left.

 

 

 

  • ·         Break the task down.
  • ·         List the different combinations on a table and compare with what you could win/lose
  • ·         Produce a flow chart for the task
  • ·         Produce some pseudo code for the task, which you might want to break down if you prefer.
  • ·         Start coding and fault finding your python code.

 

Fruit Machine Code Help

Fruit Machine Example