5. Python Program to find Area and Perimeter of a Square.
How does this program work?
- In this program you will learn about how to calculate Area and Perimeter of a Square using Python.
- To calculate the perimeter and area of a Square side of the square is required.
- This program performs mathematical calculations and displays output.
Here is the code
side = int (input ("Enter the side of a square: " ))
area = side*side #Formula for Area of square
perimeter = 4*side #Formula for Perimeter of square
print("Area of a square : ",area)
print("Perimeter of a square : ",perimeter)