how to overload the + operator for point class such that it works with either a point object or a tuple.
If the second operand is a Point, the method should return a new Point whose x coordinate is the sum of the x coordinates of the operands, and likewise for the y coordinates.
If the second operand is a tuple, the method should add the first element of the tuple to the x coordinate and the second element to the y coordinate, and return a new Point with the result.
so far I got nothing but point class which is:
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
I am still working on it and I am new to python so any type of idea would be a great help.