Question: Create a program that simulates the rolling of 2 dice. Each die has from 1 to 6 dots on each side. Two dice will be
Create a program that simulates the rolling of 2 dice. Each die has from 1 to 6 dots on each side. Two dice will be rolled at the same time. Use the random.randint() function to generate a random integer between the beginning and ending range of dot possibilities of each die. In other words, the lowest number of dots per die is 1 and the highest number of dots per die is 6. Add the number of dots from each die together to calculate total and then display as below. If both die have 1 dot each, display Snake eyes! If both die have 6 dots each, display Boxcars! Otherwise, display the total sum of both die rolls.
Your program should continue until the user responds with the letter n to the prompt to end the game. Note: your prompts and output to the user must look like the text in bold and image above, or you will lose points.
Extra details to follow:
Be sure to add comments to your program to explain your code.
Insert blank lines for readability.
You must use the random module to generate dice rolls.
You must use at least one user-defined function in your program.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
