Answer to Question #276475 in Python for Himanshi

Question #276475

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

1
Expert's answer
2021-12-06T16:43:31-0500
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")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS