codemaniacstudio

Write a Python program to enter length and breadth of a rectangle and find its area.

Write a Python program to enter length and breadth of a rectangle and find its area.

PROGRAM

# Python program to calculate the area of a rectangle
# Input: Length and Breadth
length = float(input(“Enter the length of the rectangle: “))
breadth = float(input(“Enter the breadth of the rectangle: “))
# Calculate Area
area = length * breadth
# Output: Area
print(“The area of the rectangle is:”, area)

OUTPUT

TRY THE ABOVE CODE

Exit mobile version