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 natural environment includes
How may Robo Ump change baseball? Choose one response. A It can save time and make games easier. B It will never make mistakes. c It won't change baseball. D It
Use the graph to determine the velocity between 6 and 12 seconds. m/s What was the velocity over the entire trip? m/s
Sixty tickets at $50 each cost
what protections are guaranteed by the fifth amendment?
I reposted this question pls help Ill give Brainly NO BOTS OR ILL REPORT YOU!!!!!!!
Write a short response about how this text is a good example of a short story
I am writing an essay for 8th grade about slavery and this is there any way I can make this more formal, or add more detail, or just make it better in any way?
can you please explain it ?
20ptsCan someone help me with the 4-6 sentences on this.​