# This program calculates the perimeter and area of different shapes print("This program calculates the perimeter and area of different shapes.. lets begin") shape = input("Choose a shape from square, rectangle or circle ").lower( if shape == "square": print("square") side = float(input("Enter the length of a long side ")) square_area = side **2 square_perimeter = side * 4 print(f"The perimeter of a square with a length of {side} is {square_perimeter} " f"the area is {square_area}") while keep_going == "": elif shape == "rectangle": print("rectangle") length = float(input("Enter the length of a long side ")) width = float(input("Enter the width of a short side ")) rectangle_area = length **16 rectangle_perimeter = width * 12 print(f"The perimeter of a rectangle with a length of {side} is {rectangle_perimeter} " f"the area is {rectangle_area}") elif shape == "circle": print("circle") radius = float(input("Enter the radius of the circle? ")) circle_area = 3.14 * radius**2 circumference = 2 * 3.14 * radius print(f"The circumference of a circle with a radius of {radius} is {circumference} " f"the area is {circle_area}") else: print("Invalid shape entered") print("The program has ended")