#calculate perimeter of paddock #Stefanie Remondavia #05.26.25 # Title: Calculate perimeter of paddock # Author: Stefanie Remondavia # Date: 05.25.25 # Version: Version 1 - first version, Version 1.1 - minor revisions # Purpose: Summary of what the code does / The desired outcome. print('Welcome to the fence calculator program') print('To use this program you will enter the length and width of a paddock and the price to put a fence around it...lets begin') repeat = "" while repeat =="": #collect input: length, width & price length = float(input('What is the length? ')) width = float(input('What is the width? ')) price = float(input('What is the price per meter? ')) #formulas # Rectangle: perimeter = 2 x (length + width) # or perimeter = 2 x length + 2 x width # square: perimeter = 4 x length shape = input('square or rectangle?') if shape == 'square': perimeter = length * 4 elif shape == 'rectangle': perimeter = 2 * (width = length) #display results print(f'The perimeter of the paddock is {perimeter}') #calculate the total cost cost = perimeter * price print(f'The total cost to put a fence around the paddock {cost}') repeat = input("To repeat the program press any key to end it") print('The program has ended')