class Rectangle():
    def __init__(self, l, w):
        self.length = l
        self.width  = w

    def rectangle_area(self):
        return self.length*self.width

newRectangle = Rectangle(12, 10)
print("Dimension of Rectangle - Length : %d Width : %d" % (newRectangle.length, newRectangle.width))
print("Area of Rectangle :", newRectangle.rectangle_area())

Embed on website

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