Write a program to pass length and breadth as parameter and display the area and
perimeter of a rectangle. HINT: area = length X breadth
Perimeter = 2 X (length + breadth)
Answers
Answered by
6
Answer:
# Python Program to find Area of a Rectangle
width = float(input('Please Enter the Width of a Rectangle: '))
height = float(input('Please Enter the Height of a Rectangle: '))
# calculate the area
Area = width * height
# calculate the Perimeter
Perimeter = 2 * (width + height)
print("\n Area of a Rectangle is: %.2f" %Area)
print(" Perimeter of Rectangle is: %.2f" %Perimeter)
Explanation:
hope it helps... !! ENJOY UR DAY
Similar questions
Hindi,
3 months ago
Computer Science,
3 months ago
Math,
3 months ago
English,
6 months ago
World Languages,
10 months ago
English,
10 months ago