#shape perimeter calcultor v2 print("This prograam calculates the perimeter and area of diffrent shapes") keep_going = "" while keep_going == "": shape = input("Choose a shape from square (s), rectangle (r) or circle (c) ") if shape =="s": side = float(input("Enter the length of a side ")) square_perimeter = side*4 square_area = side**2 print(f"The perimeter of a square with a length of {side} the perimeter = {square_perimeter} the area = {square_area}") print("Square") 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} The area is {area}") elif shape =="c": print("circle") radius =float(input("What is the radius ")) area = (2 * radius) *3.141 circumference = 3.141 * radius**2 print (f"The area of the circle is {area} The circumference is {circumference}") else: print("that is not a valid shape") keep_going = input("to enter another shape press enter or any key to exit") print("The program has ended")