Question: Write a Python program, in a file called dice_game.py, to simulate the following dice game: . Roll two six-sided dice .If the sum of the

Write a Python program, in a file called dice_game.py, to simulate the following dice game: . Roll two six-sided dice .If the sum of the two dice is 2, 3, or 12 the player loses .If the sum of the two dice is 7 or 11 the player wins .If the sum is any value other than 2, 3, 7, 11, or 12, then the player receives a point .If a point is established, continue rolling the dice until either a 7 is rolled (in which case the player loses), or the point value is rolled (in which case the player wins) Sample output 1 You rolled 6 + 5-11. You win! Sample output 2: You rolled 1 1 2 You lose... Sample output 3: You rolled 4 1 5 Point value 5 You rolled 3 +2=5 You win! Sample output 4: You rolled 6 39 Point value = 9 You rolled 2 + 57 You lose... Sample output 5: You rolled 6+2-8 Point value = 8 You rolled 4 26 You rolled 1 34 You rolled 4 + 4 8 You win
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
