You are viewing a single comment's thread. Return to all comments →
def Geometric(n,p): return (1-p)**(n-1) * p nume,deno = list(map(int,input().split())) n = int(input()) print(f"{sum([Geometric(i,nume/deno) for i in range(1,n+1)]):.3f}")
Seems like cookies are disabled on this browser, please enable them to open this website
Day 4: Geometric Distribution II
You are viewing a single comment's thread. Return to all comments →