# This program cauculates the perimeter and area of different shapes. print("This program cauculates the perimeter and area of different shapes.. lets begin") repeat = "" while repeat == "": shape = input("Choose a shape from a square, rectangle, or a circle.") if shape == "s": print ("square") side = float(input("Enter the length 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}") repeat = input("To repeat the program press " "enter or any other key to end it") elif shape == "r": 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}") repeat = input("To repeat the program press " "enter or any other key to end it") elif shape == "c": radius = float(input("Enter the radius of the circle ")) perimeter = (2 * radius) * 3.14 area = 3.14 * radius**2 print(f"The circumference of the circle is {perimeter} " f"the area is {area}") repeat = input("To repeat the program press " "enter or any other key to end it") else: print ("Sorry, I don't understand.") print("The program has ended.")