def MakeExponentialPmf(lam, high, n=200):
 pmf = Pmf()
 for x in np.linspace(0, high, n):
  p = EvalExponentialPdf(x, lam)
  pmf.Set(x, p)
 pmf.Normalize()
 return pmf

def MakeExponentialPmf ( lam , high , n = 200 ) : pmf = Pmf ( ) for x in np . linspace ( 0 , high , n ) : p = EvalExponentialPdf ( x , lam ) pmf . Set ( x , p ) pmf . Normalize ( ) return pmf
makes a pmf discrete approx to an exponential distribution .