#Title: Shapes Program #Author: Kieran Wheatley #Date: 4/11/26 #Version: 1 #Purpose: Asks users to select a shape from square, circle or rectangle. If they enter square then ask for the length to work out the perimeter and area, if they enter rectangle, ask for the length and width to work out the perimeter and area, if the user enters circle, ask for the radius to work out the circumference and the area. # Circle formula # Area = π r² # Circumference = 2 π r # Square formula # Perimeter = L x 4 # Area = L² print('This program calculates the perimeter and area of different shapes.. lets begin') import math while choice == no: # Input shape = input('Choose a shape from square, rectangle or circle ') if shape == 'square': square_side = int(input('Enter the lenth of a side ')) square_perimeter = square_side * 4 square_area = square_side * square_side print(f'The perimeter of a square with a length of {square_side} is {square_perimeter} the area is {square_area}') elif shape == 'circle': radius = int(input('What is the radius ')) circle_area = math.pi **radius circumference = 2 * math.pi * radius print(f'The area of the circle is {circle_area} m², the circumference is {circumference} m') choice = input('Would you like to exit? (yes or no) ') print('The program has ended')