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

Fraction sequence !! Please help
A meteorology earns $9147 monthly. what is gross annual pay?
realized income is also known as ____ (first correct answer gets 10 points)
a substance that makes things taist sweeter
Solve. x=log[2](1/128)
Radioisotopes are used to preserve food because radioisotopes: dry out the food and make the food less susceptible to bacteria and mold infestation can kill the
How did the Romans treat conquered people positively? How did they treat them negatively?
Explain how working with an individual who is distressed may impact on own wellbeing?
what is a statistic automatically tracked by Word
Divide the following polynomial and then place the answer in the proper location on the grid. Write your answer in order of decreasing powers of x. (24x 5 + 8x