import math class Point: def __init__(self, x, y): self.x = x self.y = y def get_x(self): return self.x def get_y(self): return self.y def distance_from(self, point): return math.sqrt(pow(abs(self.x - point.get_x()), 2) + pow(abs(self.y - point.get_y()), 2)) class Circle: def __init__(self, point, radius): self.center = Point(point.get_x(), point.get_y()) self.radius = radius def get_center(self): return self.center def get_radius(self): return self.radius def is_inside(self, point): return self.radius > self.center.distance_from(point) def main(): p1 = Point(0, 0) p2 = Point(2, 4) print(p1.distance_from(p2)) circle = Circle(p2, 4) print(circle.is_inside(p1)) print(circle.is_inside(Point(2, 2)))