Naren S.

asked • 03/24/21

Consider a dice game

·       All players start with 10 points.

·       A dice is rolled, and if the number on the dice is 1, 2, 3, 4 or 5, this number is added to each player’s score. If the number is 6, the score off all players is reduced to zero 

·       Before the dice is rolled each player is given the choice of continuing or taking their current score as their final score. 

·       This process is repeated until a 6 is rolled and the game ends. All players still playing at this point receive zero as their final score. 

Write a piece of Python code to simulate playing this game. Explore how the average score depends on the number of dice rolls. Discuss your findings. 


1 Expert Answer

By:

Patrick B. answered • 03/24/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.