You will write the complement rule, roll a die many times by computer, and compare the share with the theory.
The idea. . A computer can roll a die with random.randint(1, 6). After random.seed(...) it gives the same rolls every time, so the checker can test your count.
Your tasks.
p_not, return the chance that the event does not happen.share_of_ones, roll one die n times and return the share of s as a decimal.p_no_one to the chance of not rolling a , using your function from task 1.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…