#Title: Shapes program #Author: Liam Baker Campbell #Date: 03/06/2025 #Version: Version 1 #Purpose: Calculate the perimeter or area of a shape #Tell the operator what the program is about print('Welcome to the perimeter and shape program.') print('This program will calculate the perimeter and area of a shape... lets begin.') #collect shape input shape = input('Enter s for a square, r for a rectangle and c for a circle. ') if shape =='r': length = float(input('What is the length? ')) width = float(input('What is the width? ')) perimeter = (length+width)*2 area = length*width print('You selected rectangle.') print(f'The area of the rectangle is {area}, and the perimeter of the rectangle is {perimeter} meters.') elif shape =='s': length = float(input('What is the length? ')) perimeter = length * 4 area = length**2 print('You slected square.') print(f'The area of the square is {area} meters squared, and the perimeter of the square is {perimeter} meters.') else: radius = float(input('What is the radius? ')) circumfrence = (2 * 3.14) * radius area = 3.14 * radius * radius print('You selected circle.') print(f'The area of the circle is {area} meters squared, and the circumfrence of the circle is {circumfrence} meters.') #Tell the user the program has ended print('The program has ended.')