# Title: Shapes Program # Author: Logan # Date: 12 november # Version: 1 # Purpose: use variables to collect data and display it print("This program will calculate the area, perimeter and circumference of a shape.. lets begin") 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? ")) square_area = length ** 2 square_perimeter = length * 4 print(f"The area of the square is {square_area}, the perimeter is {square_perimeter} m") elif shape == "r": print("rectangle") length = float(input("What is the length? ")) width = float(input("What is the width? ")) rectangle_area = length * width rectangle_perimeter = (length + width) * 2 print(f"The area of the rectangle is {rectangle_area}, the perimeter is {rectangle_perimeter} m") else: print("circle") radius = float(input("What is the radius? ")) circle_area = 3.14 * radius ** 2 circle_circumference = 2 * 3.14 * radius print(f"The area of the circle is {circle_area} m², the circumference is {circle_circumference} m") print("The program has ended")