Question: The program: You will write a simple dice game. The game starts by giving the player $250. The game prompts the player for the amount

The program: You will write a simple dice game. The game starts by giving the player $250. The game prompts the player for the amount they want to bet and the sum of two randomly rolled die. If the player guess the sum correctly, the player wins some money based on the rules below. If the player guesses wrong, the player loses the amount that was bet. The game repeats until either the player runs out of money or the player chooses to stop playing. Here are the rules for winning and losing. If the guess matches the sum of the die and the two die have the same value, the winning is four times the bet. For example, if the player bet $100 and the player guesses four as the sum and first dice is two and second dice is two, then the player is awarded $400, which is twice the bet of $100. If the guess matches the sum of the dice but the two die have different values, then the winning amount is the same as the bet. If the player guesses the sum incorrectly, he loses the amount equal to the bet. Input validation: Make sure

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!