Question: Your Task Code the Lucky Doubles dice gome as shown in the three sample runs shown below. Here are the basic rules of the game:

Your Task
Code the Lucky Doubles dice gome as shown in the three sample runs shown below.
Here are the basic rules of the game:
One roll of the pair of dice costs 51. The player may buy as many rolls as desired
The two die numbers (each 1-6) are randomly generated for each roll.
The player wins when they roll a double (i.e, two of a kind). The prize is the foce value of the dice
In dollars. For example, two slxes will win the plaver 512
Your game will report all rolls to the player and kees track of the plaver's money tocal.
Use s loop to execute the proper number of rolls.
Below are three sample runs to demonstrate game behavior. User input is highlighted in yellow to
distineuish between input and output.
SAMPLE RUN #1(WINHING SCEMARIO - FIVE ROLLS (55 cost) AND a $10 WIN)
Step right up to plav LUCKY DOUBLES [IIII
One roll of the dise costs $1.00
One roll of the dice costs S1.00. If you roll *', you'll win the FACE VALUE of your dice in SS,
Resdy? Enter number of rolls: 5
Die1 is 3 and die 2 is 4. No luck here
Die1 is 1 and die 2 is 3. No luck here.
Die1 is 5 and die2 is 5.*+!! YOU WON $10.00!! CONGRATULATIONS!
Die1 is 1 and die 2 is 4. No luck here.
Die1 is 2 and die 2 is 1. No luck here.
Your final tatal is $5.00. Congratulationsi You came out ahesd
SAMPLE RUN $2(LO5IHG SCEMARUO - TEN ROLLS (510 CO5T) AND ONLY A SINGLE $2 WIN):
One roll of the dice costs 5100.
One roll of the dice casts $100. If you roll , you'll win the FACE VALUE of your dise in $5
Ready? Enter number of rolls: 4
Die1 is 3 and die2 is 4. No luck here.
Died is 4 and diez is 6. No luck here
Die 1 is 1 and die 2 is 4. No luck here
Your final total is $0.00. You broke even.
 Your Task Code the Lucky Doubles dice gome as shown in

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 Databases Questions!