class Rectangle:
    def __init__(self, width, height):
        self.width = width
        self.height = height

    def area(self):
        return self.width * self.height

    def compare_area(self, other):
        if self.area() >= other.area():
            return self
        else:
            return other

r1 = Rectangle(4, 5)
r2 = Rectangle(3, 8)

bigger = r1.compare_area(r2)

print(bigger.area())

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: