code: def Scale(self, factor):
          
          new = self.Copy()
          new.d.clear()
  
          for val, prob in self.Items():
              new.Set(val * factor, prob)
          return new
docs: Multiplies the values by a factor.
  
          factor: what to multiply by
  
          Returns: new object