import math class Point: def __init__(self, x = 0, y = 0): self.x = x self.y = y def __str__(self): return f"({self.x}, {self.y})" def __eq__(self, other): if type(other) != type(self): return False # I know both are Points! return self.x == other.x and self.y == other.y def reflection_across_X(self): return Point(self.x, -self.y) def distance_to(self, other): return math.hypot(self.x - other.x, self.y - other.y) def main(): p = Point(3,4) print(p) origin = Point() print(p.reflection_across_X()) print(p.distance_to(origin)) ## time to visit the nudist camp #print("Entering Camp Buff!") #p.x = 12 #print(p) q = Point(3,4) print(p == q) main()