code: def percentile(self, p):
          
  
          if not (0 <= p <= 100):
              raise ValueError("p must be between 0 and 100, inclusive.")
  
          p = float(p)/100.
          p *= self.n
          c_i = None
          t = 0
  
          if p == 0:
              return self.C.min_item()[1].mean
  
          for i, key in enumerate(self.C.keys()):
              c_i_plus_one = self.C[key]
              if i == 0:
                  k = c_i_plus_one.count / 2
  
              else:
                  k = (c_i_plus_one.count + c_i.count) / 2.
                  if p < t + k:
                      z1 = p - t
                      z2 = t + k - p
                      return (c_i.mean * z2 + c_i_plus_one.mean * z1) / (z1 + z2)
              c_i = c_i_plus_one
              t += k
  
          return self.C.max_item()[1].mean
docs: Computes the percentile of a specific value in [0,100].