You will list the outcomes of two dice with a program and turn a count into a probability.
Your tasks.
dice_outcomes, return the list of all pairs (red, blue), each number from to .prob, return the probability of an event as a Fraction: the number of outcomes for which event(o) is true, over the number of all outcomes.p_sum_8 to the probability that the two numbers add up to , using your functions.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…