baseballlife1875 baseballlife1875
  • 23-01-2020
  • Mathematics
contestada

Define a function roll_hundred_pair() that produces a histogram of the results of 100 rolls of two 6-sided dice

Respuesta :

dogacandu
dogacandu dogacandu
  • 23-01-2020

Answer:

The code is attached. I used python to define the function and matplotlib library to plot the histogram.

Step-by-step explanation:

  1. I defined a function called roll_hundred_pair
  2. I imported matplotlib.pyplot as plt and random
  3. I defined a list called dice
  4. I created an empty list to collect dice results
  5. I simulated 100 dice roll using a loop and random.sample
  6. finally I plot the histogram using plt.hist method
Ver imagen dogacandu
Answer Link

Otras preguntas

Which form of government is most efficient at meeting the needs of its citizens? Give 3 detailed reasons why.
I. FILL THE CORRECT VERBS FROM THE GIVEN BRACKET: 1. She will______ read the book. (has, have, had) . ​
Help please. Need a simple explanation. ​
according to the leadership grid, the most effective leaders have a _____ concern for people and a _________ concern for production
What is the number of terms in this expression? m/5+4⋅6 Enter your answer in the box
To an athlete dying young quiz The speakers tone is best described as A thoughtful b anxious c optimistic d adoring
Earth's rotation causes winds to veer to the west or to the east. This is known as the Coriolis effect. Lesson 1. 06 Question 5 options: True False.
What is scientific knowledge made of?
A factory is operating at 80% of capacity. The capacity is 300 cases per hour. How many cases are being produced each hour?​
help, please the question and thank you