QUESTION :- Write a PYTHON program to find the area and perimeter of square and rectangle.
Answers
Answer:
Science can be divided into different branches based on the subject of study. The physical sciences study the inorganic world and comprise the fields of astronomy, physics, chemistry, and the Earth sciences. The biological sciences such as biology and medicine study the organic world of life and its processes. Social sciences like anthropology and economics study the social and cultural aspects of human behaviour.
Explanation:
Sorry I m spammi g coz my answer are going down
Answer:
Here comes the program for the question.
1. Find the area and perimeter of the square.
s=float(input("Enter the side of the Square: "))
p=4*s
a=s*s
print(f"Perimeter of the Square is: {p} units.")
print(f"Area of the Square is: {a} unit square.")
2. Find the area and perimeter of a rectangle.
l=float(input("Enter the Length of the Rectangle: "))
b=float(input("Enter the Breadth of the Rectangle: "))
p=2*(l+b)
a=l*b
print(f"Perimeter of the Rectangle is: {p} units.")
print(f"Area of the Rectangle is: {a} unit square.")
Algorithm:
- START.
- Accept the side of square and the length, breadth of the rectangle.
- Find the perimeter and area using formula and store them in a variable.
- Display the result.
- STOP.
See the attachment for output ☑.