Program to find area of rectangle in Python.

 


Today we will learn about how to write a program to find areas of the rectangle in Python. so let's get started.

Let us see is the formula to find the area of a rectangle.

A = L*W (Area of rectangle = Length*Width)

Let us assume that the length of a rectangle is 26 and the width is 12 like this



Here is the Code of the Python file for finding the area of a rectangle

# --------- Created By Coding Gyan ------------
    # Find area of Rectangle

    length = int(input('Enter the length of the rectangle ')) # we have converted this string value of input into intiger 
    width = int(input('Enter the width of the rectangle ')) # we have converted this string value of input into intiger 

    areaOfRectangle = length*width # we have stored the area of rectangle in this varriable

    print('Area of Rectangle is')
    print(areaOfRectangle)

Please Comment Down Your Feedback

Thanks For Visiting our Blog

Post a Comment

Previous Post Next Post