Find area and perimeter of square
Algorithm:
get the value of side
multiply side by side to calculate area
multiply side by 4 to calculate perimeter
print area
print perimeter
'''
side = eval(input("Enter the value of the side "))
area = side * side
perimeter = 4 * side
print ("The side of the square is",side)
print ("The area is",area)
print ("The perimeter is",perimeter)
s=int(input("Side of sqaure: "))
area=s*s
perimeter=4*s
print("Side of square:",s)
print("Area of Square:",area)
print("Perimeter of Square:",perimeter)
Comments
Leave a comment