Given the length and breadth of a rectangle, write a program to find whether the area
of the rectangle is greater than its perimeter. For example, the area of the rectangle
with length = 5 and breadth = 4 is greater than its perimete
length=float(input("Enter length of a rectangle: "))
breadth=float(input("Enter breadth of a rectangle: "))
area=length*breadth
perimeter=2*(length+breadth)
if area>perimeter:
print("The area of the rectangle is greater than its perimeter")
else:
print("The perimeter of the rectangle is greater than its area")
Comments
Leave a comment