Suppose you are hired by Bixby Hotel and Casino to program a new game. They describe the game as follows. A player will insert an initial amount of money into the machine to start playing the game. The player will guess a number between 1 and 10 and enter how much they want to bet. If the player guesses the randomly generated number correctly, then the player wins 10 times the amount of money the player bet. If the player guesses incorrectly, the player will lose the amount that was bet. The game should continue until the user wants to stop playing or runs out of money.

Here are some things that they want to happen as the player plays the game:

1. There should be a summary of the rules for the player to read every time the player enters a bet.

2. The user should see their remaining balance after every game, so they know how much they can bet for the next game.

3. Make sure to check that the player can bet the amount they enter, it should not be more than their remaining balance.

4. The player should be able to continue or quit after a game depending on if they want to keep playing or stop. If they quit, they should be told how many credits they have left.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.