#This program will calculate the area, perimeter and circumference of a shape import math # Collect input name = input ("What is your name? ") print(f"Kia ora {name} ") print("This program will calculate the area, perimeter and circumference of a shape.. lets begin.") #variables shape = input ("Enter s for square, r for rectangle or c for circle ") if shape == "s": print("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 == "r": print("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') if shape == "c": print("circle") radius = float(input("What is the radius? ")) area = math.pi * radius **2 circumference = (2 * radius) * math.pi print(f'the area of the circle is {area}, the circumference is {circumference} m') #Display output print("The program has ended")