Question: PYTHON ONLY!!For this assignment, you will write a program to simulate the craps dice game. The rules of the game are straightforward: You roll two
PYTHON ONLY!!For this assignment, you will write a program to simulate the craps dice game.
The rules of the game are straightforward:
You roll two dice. Each die has six faces, which contain one, two, three, four,
five and six spots, respectively. After the dice have come to rest, the sum of
the spots on the two upward faces is calculated.
If the sum is 7 or 11 on the first throw, you win.
If the sum is 2, 3 or 12 on the first throw (called craps), you lose (i.e., the house wins).
If the sum is 4, 5, 6, 8, 9 or 10 on the first throw, that sum becomes your point.
To win, you must continue rolling the dice until you make your point (i.e., roll that same
point value). You lose by rolling a 7 before making your point.
Examples of output:
======================== RESTART: C:/Python37/Game.py ======================== 6 and 6 for roll of 12 Loser >>> ======================== RESTART: C:/Python37/Game.py ======================== 4 and 5 for roll of 9 2 and 5 for roll of 7 You rolled a 7 - LOSER >>> ======================== RESTART: C:/Python37/Game.py ======================== 3 and 2 for roll of 5 2 and 3 for roll of 5 You made your point - WIN >>> ======================== RESTART: C:/Python37/Game.py ======================== 5 and 2 for roll of 7 You Win! >>> ======================== RESTART: C:/Python37/Game.py ======================== 2 and 3 for roll of 5 3 and 5 for roll of 8 1 and 6 for roll of 7 You rolled a 7 - LOSER >>> ======================== RESTART: C:/Python37/Game.py ======================== 4 and 5 for roll of 9 5 and 5 for roll of 10 5 and 6 for roll of 11 1 and 3 for roll of 4 6 and 2 for roll of 8 5 and 1 for roll of 6 3 and 6 for roll of 9 You made your point - WIN >>> ======================== RESTART: C:/Python37/Game.py ======================== 6 and 4 for roll of 10 6 and 1 for roll of 7 You rolled a 7 - LOSER >>> ======================== RESTART: C:/Python37/Game.py ======================== 4 and 2 for roll of 6 5 and 6 for roll of 11 1 and 5 for roll of 6 You made your point - WIN
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
