# Title: Shapes Program # Author: Corrin (me) # Date: 3/06/2025 # Version: Version 1 # Purpose: Calculate the perimeter and area of a square, circle or rectangle. print("Welcome to the shape calculator program!") print("To use this program you will choose a shape from either a square, circle or rectangle and you will type in either the length, height or radius depending on the shape you choose, then it will work out either the perimeter, area or circumference.") repeat = "" while repeat == "": shape = input("What shape do you want to choose from square, circle or rectangle?") if shape =="s": length = float(input("What is the length? ")) perimeter = length * 4 area = length**2 print(f"The area of the square is {area}, the perimeter is {perimeter} m") repeat = input("To repeat the program press an key or " "enter or any other key to end it") elif shape=="r": length = float(input("What is the length? ")) width = float(input("What is the width? ")) perimeter = (length + width) * 2 area = length * width print(f"The area of the rectangle is {area}, the perimeter is {perimeter} m") repeat = input("To repeat the program press an key or " "enter or any other key to end it") else: 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") repeat = input("To repeat the program press an key or " "enter or any other key to end it") print('The program has ended')