#a. Title: Shapes Program #b. Author: Davi Barbosa #c. Date: 16/10/25 #d. Version: Version 1 #e. Purpose: Give the perimeter and area of a shape selected. print('Welcome to the Shape Calculator!') print('This program can calculate the perimeter and area of certain shapes') shape = input('Please enter s for square, c for circle or r for rectangle ') if shape == 's' : print('square') s = float(input('What is the length? ')) s_area = s * s s_perimeter = s + s + s + s print(f'The area of the square is {s_area} m2') print(f'The perimeter of the square is {s_perimeter} m') print('The program has ended') elif shape == 'r' : print('rectangle') r_length = float(input('What is the length? ')) r_height = float(input('What is the height? ')) r_area = r_length * r_height r_perimeter = r_height + r_height + r_length + r_length print(f'The area of the rectangle is {r_area} m2') print(f'The perimeter of the rectangle is {r_perimeter} m') print('The program has ended') elif shape == 'c' : print('circle') c = float(input('What is the radius? ')) c_area = 3.14 * (c * c) c_circumference = 2 * 3.14 * c print(f'The area of the circle is {c_area} m2') print(f'The circumference of the circle is {c_circumference} m') print('The program has ended') else: print('Unexpected error, please try again')