1. Probability of an Event

Easy

When every outcome is equally likely, the probability of an event is the number of favourable outcomes divided by the total number of outcomes:

P(A)=AΩP(A) = \frac{|A|}{|\Omega|}

Return P(event) as a float. Both arguments are sets.

solve({2, 4, 6}, {1, 2, 3, 4, 5, 6})  ->  0.5

Sign in to write and run your own code.

Implement solve(...)