from __future__ import annotations from numbers import Number from math import atan2, degrees class Point: def __init__(self, x: Number, y: Number) -> None: self.x = x self.y = y def get_angle_to(self, another_point: Point) -> float: return degrees(atan2(another_point.x - self.x, another_point.y - self.y)) center = Point(0, 0) point = Point(float(input("X:\t")), float(input("Y:\t"))) angle = center.get_angle_to(point) if 0<=angle<=45 or -180<=angle<=-135: print("Point is in the painted over area.") else: print("Point is not in the painted over area.")