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

3) 17x - 3 = 626 can yall show me all the steps of how yall did it plz​
NEED HELP FAST!!!!!!!!!!!!!!!!!!!!
Which is equivalent to RootIndex 3 StartRoot 8 EndRoot Superscript one-fourth x?
Find (f*g)(x) for the following functions. f(x) = 2x2 – 7x – 6 g(x) = 4x – 6
Complete the square to transform the expression x2 + 6x + 5 into the form a(x − h)2 + k.
many biochemical reactions occur when there is a particular salt -blank- in the cells solution ​
If we take the reciprocal of both sides of an equation, are the two reciprocals equal? If yes, always? If no, can it ever be so? Provide numerical examples to i
What is the frequency of 20 mm microwaves?
Starting from rest a model rocket accelerates upwards at 24 m/s2. How fast will it be moving after it has traveled 192 meters?
What is 30 less than 0