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 or the player loses. If the total is or 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 noName your program in the form Lastnamefirstnamedice.pyHere is a sample run of the program:You rolled and for a total of Your "point" is Roll again? Type Y for yes, anything else for no: Y You rolled and for a total of You win!Roll again? Type Y for yes, anything else for no: yYou rolled and for a total of Your "point" is Roll again? Type Y for yes, anything else for no: Y You rolled and for a total of 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
