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 perimeter
This program is a basic implementation of a program that calculates the area and perimeter of a rectangle and then compares them.
len = float(input("Enter the Length : ")) bre = float(input("Enter the Breadth : ")) area = len * bre; perimeter = 2 * (len+bre) print("Area of Rectangle :", area) print("Perimeter of Rectangle :", perimeter) if (area>perimeter): print("Area of rectangle is greater than Perimeter") else: print("Perimeter of rectangle is greater than Area")
Enter the Length : 12 Enter the Breadth : 13 Area of Rectangle : 156.0 Perimeter of Rectangle : 50.0 Area of rectangle is greater than Perimeter
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions