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 train accelerates from a station with a = 1.841m/s ? Upon reaching a speed of 23.52m/s the train travels at a constant velocity for a period. The train slows
There’s a picture so I don’t have to type out the question
How many instructions could fit into a 256 byte memory unit, given a 32-bit architecture?
A horizontal pipe 15 cm in diameter and 4 m long is buried in the earth at a depth of 20 cm. The pipe-wall temperature is 75 degree C and the earth surface temp
see the picture below!!
What are the 4 types of evidence?
Two identical guitar strings are prepared such that they have the same length (2.17 m) and are under the same amount of tension. The first string is plucked at
During the second wave of U.S. environmental policy, in 1872, Congress designated Yellowstone as the world's first
is 71.5186 irrational​
What is the sum of the rational expressions below?