Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are doing a statistic research by collecting the sum of rolling 2 dices. To add a variation on the result set, one of the

You are doing a statistic research by collecting the sum of rolling 2 dices. To add a
variation on the result set, one of the dice is with faces of 1,1,2,3,4,5 and the other
one is normal 6-face die has faces 1,2,3,4,5,6.
Write a program that rolls two dice as described above, calculate the outcome, collect
the statistics and find out the probability of rolling each possible outcome.
Roll 100000 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.[10 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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

IBM Db2 11 1 Certification Guide Explore Techniques To Master Database Programming And Administration Tasks In IBM Db2

Authors: Mohankumar Saraswatipura ,Robert Collins

1st Edition

1788626915, 978-1788626910

More Books

Students also viewed these Databases questions