# This program calculates the perimeter and area of different shapes print ("This program calculates the perimeter and area of different shapes") keep_going == "": while keep_going: shape = input("choose a shape from square, rectangle or circle ") #check user input if shape == "square": print ("square") side = float(input("Enter the lenght of a 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}") elif shape == "rectangle": print ("rectangle") length = float(input("Enter the length of the rectangle ")) width = float(input("Enter the width of the rectangle ")) perimeter = (length + width) * 2 area = width * length print (f"The perimeter of the rectangle is {perimeter} " f"the area is {area}") elif: print ("circle") radius = float(input("What is the radius? ")) area = 3.14 * radius**2 circumference = 2 * 3.14 * radius print (f"The area of the circle is {area}, the circumference is {circumference} m") else: print("That is not a valid shape") print("The program has ended")