Question: The below is using Python programming The Ngak Yan casino has some dubious practices. In the games using three 6-face dices, one of them is
The below is using Python programming
The Ngak Yan casino has some dubious practices. In the games using three 6-face dices, one of them is purposely replaced with faces of 1, 2, 3, 4, 5, 5 so that 6 will never come out. Assume that you know a normal 6-face die has faces 1, 2, 3, 4, 5, 6. For curiosity, you wish to know how the statistics of the outcomes, which is the sum of throwing the 3 dices (with one of them a cheat die ), will be like. Write a program that rolls three dices of which one of the dices has the above defect, calculates the outcomes, collects the statistics, and finds out the probability of rolling each possible outcome. Roll 1000 times and then print out the frequency (number of times having each of the outcome values) and also print the corresponding graph. Submit your solution in q1d.py. [8 marks] The program should require no input. The output should look like the example below. Note that due to randomness the exact frequencies will change. The bar chart should be scaled appropriately for analysis.

13 * 24 ** 104 ** Sum Freq 3 2 4 5 6 58 ***** 7 72 ******* 8 9 137 * 10 132 11 12 107 ** 13 14 76 ******* 15 32 *** 16 17 11 18 0 * * * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * 128 * * * * * * 81 ** 23 ** *
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
