You are viewing a single comment's thread. Return to all comments →
p1= (4/7) * (5/9) * (4/8)
p2 = (4/7) * (4/9) * (4/8)
p3 = (3/7) * (5/9) * (4/8)
p_total=p1+p2+p3
numerator = 80+64+60 denominator=504
def gcd(a,b): while b !=0: a,b =b, a%b return a
g=gcd(numerator,denominator)
numerator //=g denominator //=g
print(f"{numerator}/{denominator}")
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Basic Probability Puzzles #3
You are viewing a single comment's thread. Return to all comments →
p1= (4/7) * (5/9) * (4/8)
p2 = (4/7) * (4/9) * (4/8)
p3 = (3/7) * (5/9) * (4/8)
p_total=p1+p2+p3
numerator = 80+64+60 denominator=504
def gcd(a,b): while b !=0: a,b =b, a%b return a
g=gcd(numerator,denominator)
numerator //=g denominator //=g
print(f"{numerator}/{denominator}")