# Title: Shapes # Author: Hailey Lau # Date: 3/06/25 # Version: # purpose: The program is to help people find out about the area of and perimeter of a shape. # collect shape input print('welcome, this program will calculate the area and perimeter of a shape, lets begin') repeat = 'yes' while repeat == 'yes': shape = input('What shape from rectangle, square or circle? ') if shape == 'rectangle': print('you selected 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 rectangle is {area} and the perimeter is {perimeter} m') elif shape == 'square': print('you selected square') length = float(input('What is the length? ')) perimeter = length**2 a = length * 2 print(f'The area of square is {a} and the perimeter is {perimeter} m') else: print('you selected circle') radius = float(input('What is the radius? ')) area = 3.14 * radius**2 c = 2 * 3.14 * radius print(f'The area of the circle is {area} and the circumference {c}') repeat = input('Do you want to claculate another shape? (yes/no): ') print('Thank you for using the math calculator. Goodbye. ')