Learn about Python Program to Find Area of a Rectangle in the below code example. Also refer the comments in the code snippet to get a detailed view about what’s actually happening.
Contents
Python Program to Find Area of a Rectangle
# program to find area of rectangle
# length & width
length = 2
width = 5
# calculating the area of rectangle
area = length * width
# print result
print('Area of rectangle = ',area)
Output:
Area of rectangle = 10
Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.
Similar Code : Python Program to Find Area of Triangle Using Function