Question: vrite a program using random number functions.InstructionsThe dice game called craps has two phases. In the first phase, the player rolls two dice. If the

vrite a program using random number functions.InstructionsThe dice game called "craps" has two phases. In the first phase, the player rolls two dice. If the total of the dice is 2,3, or 12, the player loses. If the total is 7 or 11, the player wins. For all other totals, the game enters its second phase with the total as the player's "point."In this program, you will implement the first phase of the game. The program will roll a pair of dice, showing their values, the total, and the result.The program will then ask the player if they wish to play again. It accepts "Y" or "y" for yes, and anything else as no.Name your program in the form Lastname_firstname_dice.pyHere is a sample run of the program:You rolled 2 and 4 for a total of 6.Your "point" is 6.Roll again? Type Y for yes, anything else for no: Y You rolled 5 and 2 for a total of 7.You win!Roll again? Type Y for yes, anything else for no: yYou rolled 3 and 6 for a total of 9.Your "point" is 9.Roll again? Type Y for yes, anything else for no: Y You rolled 1 and 2 for a total of 3.You lose, sorry.Roll again? Type Y for yes, anything else for no: n Thanks for playing!Hint: You can compare strings in the same way you compare numbers. Try this code

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