#This program will ask for a shape and measurement. It will calculate the chosen shapes perimiter and area based on the measurement given. #Collect input name = input('What is your name? ') print(f'Kia ora {name}') shape = input(f'This program calculates the perimiter and area of different shapes. {name}, what shape do you want to select? square, rectangle or circle? ') if shape == 'square': length = float(input('What is the length of your square? ')) perimeter = length + length + length + length area = length * length print(f'The perimeter of a square with a length of {length} is {perimeter} and the area is {area}.') elif shape == 'rectangle': length = float(input('What is the length of your rectangle? ')) width = float(input('What is the width of your rectangle? ')) perimeter = width + length + width + length area = length * width print(f'The perimiter of a rectangle with a length of {length} and a width of {width} is {perimeter} and the area is {area}.') elif shape == 'circle': radius = float(input('What is the radius of your circle? ')) circumference = 2 * 3.14 * radius area = 3.14 * (radius * radius) print(f'The circumference of a circle with a radius of {radius} is {circumference} and the area is {area}.') else: print('You have chosen an invalid shape') #Display output print('The program has ended')