# Title: Shapes Program # Author: Josh Minchington # Date: 12 November 2026 # version: 1 # purpose: to calculate the dimensions of a circle, square, or rectangle print('This program calculates the perimeter and area of different shapes.. lets begin') shape = input('Choose a shape from square, rectangle or circle ') if shape == 'square': 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}") elif shape == 'rectangle': print('rectangle') length = float(input('What is the length? ')) width = float(input('What is the width? ')) rectangle_area = length * width rectangle_perimeter = length + length + width + width print(f"The perimeter of a rectangle with a length of {length} is {rectangle_perimeter} " f" the area is {rectangle_area}") else: print('circle') radius = float(input('What is the radius? ')) circle_area = 3.14159 * radius **2 circle_circumference = 2 * 3.14159 * radius print(f"The area of the circle is {circle_area} m², the circumference is {circle_circumference} m") print('The program has ended')