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

SOLUTION....

# Program to calculate Area and Perimeter of a Rectangle

# Input values
length = float(input("Enter length of rectangle: "))
breadth = float(input("Enter breadth of rectangle: "))

# Calculations
area = length * breadth
perimeter = 2 * (length + breadth)

# Output
print("Area of Rectangle =",area)
print("Perimeter of Rectangle =",perimeter)

OUTPUT

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.