7. Addition Rule

Easy

The probability of a union is not simply the sum, because the overlap would be counted twice:

P(AB)=P(A)+P(B)P(AB)P(A \cup B) = P(A) + P(B) - P(A \cap B)

Return P(AB)P(A \cup B).

solve(0.5, 0.5, 1/3)  ->  0.6666666666666667

Sign in to write and run your own code.

Implement solve(...)