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

what is the correct interpretation of this diagram 1. Since the unbalanced force is at the top, the object will move down. 2. since three forces are balanced,
WXYZ is a kite with the diagnosis intersecting at V. WV=16 and XV=12 find the measure of WX
Which equation results from taking the square root of both sides (x-9)^2=81
What is the correct order which depicts the levels of organization needed to form a plan?
Why did businesses move their factories to the south after 1960?
What is distribution?
"write a program that takes as input an arithmetic expression. the program outputs whether the expression contains matching grouping symbols. for example, the a
What is the sum of the measures of ∠1 and ∠2? What is the sum of the measures of ∠1 and ∠2?
The sides of square ABCD .. (photo provided)
Linear perspective is a device used for achieving: