Write a program to calculate the area and perimeter for the rectangle that accepts length &
breadth from the user.
Answers
Answered by
1
Answer:
Python programming
Explanation:
def areaRectangle(a, b):
return (a * b)
def perimeterRectangle(a, b):
return (2 * (a + b))
a = int(input());
b = int(input());
print ("Area = ", areaRectangle(a, b))
print ("Perimeter = ", perimeterRectangle(a, b))
Answered by
2
Answer:
PYTHON PROGRAM TO ACCEPT LENGTH, BREADTH AND CALCULATE AREA AND PERIMETER.
rect_length = input("Enter length of the rectangle")
rect_width = input("Enter width of the rectangle")
rect_perimeter = rect_length*2 + rect_width*2
rect_area = rect_length * rect_width
print("Area of Rectangle = " rect_area)
print("Perimeter of Rectangle =" rect_perimeter)
Similar questions