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

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

    def perimeter(self):
        return 2 * (self.width + self.height)


rect = Rectangle(5, 3)
print(rect.area())     
print(rect.perimeter())

Embed on website

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