Lecture 6 Finger Exercise
Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.
Which of the following are true?
Check all that apply.
Note: If your test case is failing on the first submit, try submitting again.
The randomness of the simulation might be what is causing the tests to fail.simulate_dice_probability(num_trials) that meets the specification below.
You do not need to import random; the server will import it for you.
def simulate_dice_probability(num_trials):
"""
Use a simulation to estimate the probability that the sum of 7 dice is divisible by either 5 or 8
Parameters:
num_trials (int): The number of trials to run in the simulation
Return a list containing the [probability, variance] in that order.
"""
# your code here