• + 0 comments
    import math
    
    p = 1/3
    q = 1-p
    n = 5
    
    
    def geometricDistribution(successProb, failureProb, position):
        result = (failureProb)**(position-1) * successProb
        print(round(result, 3) )
        
        
    geometricDistribution(p, q, n)