code: def lksprob(alam):
      
      fac = 2.0
      sum = 0.0
      termbf = 0.0
      a2 = -2.0*alam*alam
      for j in range(1,201):
          term = fac*math.exp(a2*j*j)
          sum = sum + term
          if math.fabs(term) <= (0.001*termbf) or math.fabs(term) < (1.0e-8*sum):
              return sum
          fac = -fac
          termbf = math.fabs(term)
      return 1.0
docs: Computes a Kolmolgorov-Smirnov t-test significance level.  Adapted from
  Numerical Recipies.
  
  Usage:   lksprob(alam)