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

a field hockey ball is launched from the ground at an angle to the horizontal. what are the ball's horizontal and vertical accelerations at its maximum height?
Note three aphorisms that deal directly with friendship
Identify the form of energy that is converted into thermal energy by your body
Which of the following is TRUE about Supreme Court justices? A. They are the country’s foremost authorities on state constitutions. B. Justices throw cases away
Write as a decimal 200 add three tens add nine hundreds
what event brought the end of the Mesozoic Era? A. a minor earthquake B. the evolution of bacteria C. a global mass extinction D. one volcanic eruption
Note three aphorisms that deal directly with friendship
Sections of the U.S. Constitution serve to organize the main ideas of the _____. Articles Preamble Signatories Categories
What is the term used for a completed outer shell of eight outer shell
describes the Forbidden City