Question: second part python First part Create a function to roll a dice. This function needs to generate 2 rondom numbers from 1 to 6 and

 second part python First part Create a function to roll a
second part
python

First part Create a function to roll a dice. This function needs to generate 2 rondom numbers from 1 to 6 and return the sum of numbers. You can utilize function random.randrange to create a function to roll a dice. [4]: def dice_roll(n): dicei = random.randrange(1,6) dice2 = random.randrage(1,6) for i in range(n): sumofdiceedice2edice return sumofdice 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 first throw (called "craps"), the player loses (le, 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 looses 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 "make your point" (as same current point). The player loses by rolling a 7 before making the point 5): #the rest of the code goes here

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!