WARWICK IFP – COMPUTER SCIENCE
PYTHON3 PROGRAMMING PROJECT (30%)
Release: 23 March 2021 MONDAY 12pm
Final Submission: 12th May 2021 MONDAY
12pm Total time (including Easter): 8 weeks
Game of Chance - Roulette
A casino has asked you to create a program which allows users to
play a Game of Chance. The game of chance is similar to roulette in
a casino. There are a few rules to this game. A user can place a bet
on a number from 1 to 36. Out of these 36 numbers, 18 of these are
even and black and the other 18 are white and odd. The rules for
this game are as follows:
The user starts off with a balance of £100. When the roulette wheel
spins they can play one chip which is worth £10.
The user can play roulette in a few ways with varying levels of risk.
The most risky is to predict a number from 1 - 36. This means that
they will lose their money if the number lands on any number that
isn't what they chose or x 36 .
Another option is to have a 50% chance which is to choose even or
odd. In this case, if the number is chosen, they will double their
money. Otherwise they will lose their money.
The final option is high/low. They can predict the number will be
between 1-18 or 19 - 36. In this case, they will also double their
money if within the range or lose their money if not in range.
1. Before the user can access the roulette, they need to enter a
password to login. If this password is incorrect, they will be
allowed 3 tries to enter their password correctly, otherwise a
message should be displayed which asks the user to contact the
2. A user should be given the choice to play the game or print
out the results of previous games. A disclaimer should be printed
here that they must agree that they are more than likely to lose
their money and that the odds are against them.
3. The users name should be asked for, so that their results can
be stored later.
4. The user can then play the game as often as they wish until
they want to leave the game or lose all their money. Once the
balance is zero, the game will deliver a message to say that the
user needs to top up more money or they can leave the game.
5. Once the user has finished playing the game, their results are
written to a file.
6. The user should be able to choose to see their result history,
the order in which they were played.
The main objectives are listed above. You are free to add to these
with any additions of your own choice for the game. You are able
to obtain a high grade by meeting the criteria which has been
given in the mark scheme for the project.
For the project write up, please see the document attached to
For any questions, please contact your module leader Zahid Khan
during office hours. 学霸联盟