From 4765da646f4d74a4b86187aaa065902897db8fbe Mon Sep 17 00:00:00 2001 From: Liam Swayne Date: Tue, 21 Nov 2023 14:29:43 -0500 Subject: [PATCH] rename variables --- linear_program.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linear_program.py b/linear_program.py index 023f944..10f106f 100644 --- a/linear_program.py +++ b/linear_program.py @@ -5,7 +5,7 @@ # 1000 is used a placeholder throughout the document for unknown values # solve linear system -def calculcate(floors=1, xLength=1, yLength=1): +def calculate(floors=1, xLength=1, yLength=1): # floors is the number of floors of the building # xLength is the length of the building in tiles # yLength is the width of the building in tiles @@ -63,9 +63,11 @@ def calculcate(floors=1, xLength=1, yLength=1): floors = int(sys.argv[1]) xLength = int(sys.argv[2]) yLength = int(sys.argv[3]) + calculate(floors, xLength, yLength) else: print("Invalid command-line arguments. Follow this format: python script.py floors xLength yLength") randomFloors = random.randint(1, 10) randomXLength = random.randint(1, 10) randomYLength = random.randint(1, 10) print("Running randomized values: floors=" + str(randomFloors) + " xLength=" + str(randomXLength) + " yLength=" + str(randomYLength)) + calculate(randomFloors, randomXLength, randomYLength) \ No newline at end of file