#Title: Shapes Program #Author: Hunter Stevenson #Date: 04/11/26 #Version: 1 #Purpose: Ask users to pick a shape, work out perimeter and area and display. print('This program calculates the perimeter and area of different shapes') while True: shape = input('Choose a shape from square, rectangle or circle, or type quit to exit the program ') if shape == 'square': print('Square') length = float(input('Enter the length of a side ')) area = length **2 perimeter = length * 4 print(f'The perimeter of a square with a length of {length} is {perimeter} m, the area is {area} m²') elif shape == 'rectangle': print('Rectangle') length = float(input('What is the length? ')) width = float(input('What is the width? ')) perimeter = (length * 2) + (width * 2) area = length * width print(f'The area of the rectangle is {area} m², the perimeter is {perimeter} m') elif shape == 'circle': print('Circle') radius = float(input('What is the radius? ')) perimeter = 2 * 3.14159265359 * radius area = 3.14159265359 * (radius ** 2) print(f'The area of the circle is {area} m², the circumference is {perimeter} m') elif shape == 'quit': print('The program has ended') break else: print('That is not a valid shape')