# Python Program to Find the Area of a Rectangle Using Classes

In this example, we will write a python program to find the area of a rectangle using class and objects. To better understand this example, make sure you have knowledge of the following tutorials:-

## Python Program to Find the Area of a Rectangle Using Classes

class Rectangle:
self.length = length

def area(self):

a = int(input("Enter length of rectangle: "))
b = int(input("Enter breadth of rectangle: "))
obj = Rectangle(a, b)
print("Area of rectangle:", obj.area())

The output of the above program is:-

Enter length of rectangle: 30