find area of square in python

In this example, you will find area and perimeter of square by user entered side.

Example :

    
#Python Program to find area and perimeter of square
s=int(input("Enter the side : "))

area = s * s
perimeter=4*s

print("Area of square : ",area)
print("Perimeter of square :",perimeter)
       

Output :

    
Enter the side : 10
Area of square :  100
Perimeter of square : 40
    

Share your thoughts

Ask anything about this examples