Answer to Question #296842 in Python for hans

Question #296842

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)




1
Expert's answer
2022-02-12T04:42:37-0500
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)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS