You are on page 1of 1

One Armed Bandit (y10)

A one-armed bandit has a variety of fruits printed onto three wheels; someone
playing pulls the arm and the wheels rotate. After a few seconds the wheels stop,
revealing three randomly chosen fruits. If the fruits match the player wins a prize.
There are different probabilities of different fruits and so different prizes for each.

1. Cycle through a series of fruits each of which has a different chance of


being picked and then randomly selects one on each of the three wheels.
2. Players start with 10 coins each time the leaver is pulled a coin is deducted
3. Rewards a large value of coins as a prize for three matching fruits
4. Rewards a smaller value of coins for two fruits the same
5. Allows the user to play multiple times

Above and beyond; on each leaver pull the players coins should reduce by 1 until the player runs out of coins

Above and beyond beyond; results are saved to a text file

Design

Create a one page flowchart and pseudocode in your blue books.


Start at the top of the page using a pencil. Correct flowchart symbols must be used. Think carefully about whether
you will be including the above and beyond feature. You should also declare your variable names at this point and
any formulas you will be using.

Variable Table

Variable label Data type Purpose Example


First_name String Store the users first name to give a personal gaming experience Joe Bloggs

Implementation & Development

Using python create a solution for the game, document the critical four stages of your development in the word
document provided. Each stage should have a print screen of your code and also the program working at that point.

Once you are certain the program works and have completed the testing section, comment your code

Testing

Complete your own testing table, aim for 10 tests with a variety of typical and extreme tests. Erroneous tests not
required.

Evaluation

Evaluate your programme in a short summary. How can your program be adjusted the settings of your game to
ensure the player always eventually loses.

You might also like