code: def contains(self, location):
      
      if self.almostEqual(location[0] ** 2 + location[1] ** 2, self.radius ** 2):
        return abs(location[2]) < self.height / 2.
      if self.almostEqual(location[2], self.height / 2.):
        return location[0] ** 2 + location[1] ** 2 < self.radius ** 2
      return False
docs: Checks that the provided point is on the cylinder.