i having problem with operator overloading question
pls anyone let me know about this is correct def __add__(self,other): #add method for adding two Shape objects if isinstance(other,Shape): new_width=self.width + other.width new_height=self.height + other.height return Shape(new_width,new_height) else: raise TypeError("Unsupported operand type for +:{}".format (type(other)) def __gt__(self,other): #Greter-than method for comparing the areas of two shape objects if isinstance(other, Shape): return self.area()> other.area() else: raise TypeError("Unsupported operand type for >:{}".format (type(other)) for me is correct they asking having invalid syntax with def __gt__ pls