The game of craps has a lot of complexity, but the basic structure is fairly simple. In
Fantastic news! We've Found the answer you've been seeking!
Question:
The game of craps has a lot of complexity, but the basic structure is fairly simple. In this project, you will code a crap simulation. (Don't worry if you have never played the game of craps. The instructions below can be followed even if you don't know all the rules of the game.)
- Write a Python program in a .py file that includes the following:
- First, roll two six-sided dice (use variables and the random number generator) and store the sum in a variable.
- If the sum is 7 or 11, print a message that the player is a winner in one roll of the dice.
- If the roll is a 2, 3, or 12, print a message that the player is a loser in one roll of the dice.
- For any other number, the player has established a "point". Continue to roll and sum the dice (print the sum for each roll) until either a 7 occurs or the point sum occurs a second time.
- If the roll now is a 7, print a loser message with the total number of rolls.
- If the point sum is rolled, print a winning message with the total number of rolls.
r
Related Book For
Posted Date: