#Title: Shapes #Author: Kingsley #Date: 6/06/2025 #Version: V1.1 #Purpose: Get the area and perimeter of a rectangle, circle, and square print('Welcome to the perimeter and shape program') print('This program will calculate the perimeter and area of a shape...lets begin') shape = input('Enter s for square, r for rectangle or c for circle ') if shape == 'r': print('Your selected shape is: Rectangle') length = float(input('What is the length? ')) width = float(input('What is the width? ')) perimeter = (length+width)*2 area = length*width if shape == 'R': print('Your selected shape is: Rectangle') 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') elif shape == 's': print('Your selected shape is: Square') length = float(input('What is the length? ')) perimeter = length*4 area = length**length print(f'The area of the square is {area}, the perimeter is {perimeter} m') elif shape == 'S': print('Your selected shape is: Square') length = float(input('What is the length? ')) perimeter = length*4 area = length**length print(f'The area of the square is {area}, the perimeter is {perimeter} m') elif shape == 'c': print('Your selected shape is: Circle') radius = float(input('What is the radius? ')) area = 3.141592653589793*radius**radius circumference = 2*3.141592653589793*radius elif shape == 'C': print('Your selected shape is: Circle') radius = float(input('What is the radius? ')) area = 3.141592653589793*radius**radius circumference = 2*3.141592653589793*radius print(f'The area of the circle is {area}m², the circumference is {circumference}') print('The program has ended')