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

Which phrase best defines lalssez-fairs?
I want the answer of this question
Do you need to speak the same language well to make friends with someone? Why ? Why not?
Jordan's grandmother uses the juice from squeezed lemons to remove stains from his shirt. He hypothesizes that the juice is the only part of the lemon that is e
An insulated rigid tank is divided into two equal parts by a partition. Initially, one part contains 4 kg of an ideal gas at 750 kPa and 48°C, and the other par
Fifty random shoppers at an electronics store have been interviewed and 35 of them intend to purchase a newly released smart phone. What probability distributio
Marcus is wanting to prove that parallelogram ABCD is a square. He shows that opposite sides are congruent and opposite sides are parallel. Can he conclude ABCD
Verify the identity. Please explain step by step.
what are some short term effects of using drugs
What password that the boss gave to the man?