Question: Exercise 2 Create a function to folla dice and utilize it to develop a game of chance as described below: A player rolls two dice.

 Exercise 2 Create a function to folla dice and utilize it

Exercise 2 Create a function to folla dice and utilize it to develop a game of chance as described below: A player rolls two dice. Each dia has six faces. These facas contain 1, 2, 3, 4, 5 and 6 spots. After the dice have come to rest, the sum of the spots on the two upward faces in calculated. If the sum is 7 or 11 on the first throw, the player wins. If the sum is 2, 3 or 12 on the first throw (called "craps"), the player loses 6.e.. the house wind). If the sum is 4,5,6,8,9 or 10 on the first throw, then that num becomes the player's "point." To win, you must continue rolling the dice until you make your points same current point). The player lose by rolling a 7 before making the point Note: utilize function random.candrange to create a function to roll a doo First part Create a function to roll a dion. This function needs to generate 2 random numbers from 1 to 6 and return the sum of numbers. You can utilize function randomrandrange to create a function to roll a dice In 141: Fereate the function here Second part Call the function created above. Use conditional statements to do the following if the sum is 7 or 11 on the first throw, the player wins. If the sum is 2.3 or 12 on the test throw (edcraps, the player to the house wins. If the sum is 4,5,6,8,9 or 10 on the first throw, then that sum becomes the player's "point if the player neither ones or wins on the first throw, you need to use loop to continue the game. To win, you must continue rolling the dice until you ce your points same current point. The player one by rolling a 7 before making the point, In the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!