From f918ffa78600c92c4d57a243e0125ab50290be64 Mon Sep 17 00:00:00 2001 From: Aiden Swayne Date: Tue, 28 Nov 2023 12:26:40 -0500 Subject: [PATCH] fixed formatting --- linear_program.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/linear_program.py b/linear_program.py index a9b7c03..9c67867 100644 --- a/linear_program.py +++ b/linear_program.py @@ -122,13 +122,13 @@ def calculate(floors=1, xLength=1, yLength=1): logs.append("Parameters given: " + str(floors) + " floor, " + str(xLength) + " meter x length, " + str(yLength) + " meter y length.") logs.append("\nCost of materials and offsets (measured in USD): $" + "{:.2f}".format(round(cost.value, 2))) logs.append("\nColumns (measured in quantity):") - logs.append("Aluminum columns needed: " + str(aluminumColumns.value*floors)) - logs.append("Steel columns needed: " + str(steelColumns.value*floors)) + logs.append("Aluminum columns needed: " + abs(aluminumColumns.value*floors)) + logs.append("Steel columns needed: " + abs(steelColumns.value*floors)) logs.append("\nCarbon offsets (measured in acres):") - logs.append("Oak tree acres: " + str(abs(oakTreeAcres.value))) - logs.append("Slash pine acres: " + str(abs(slashPineAcres.value))) - logs.append("Eucalyptus tree acres: " + str(abs(eucalyptusTreeAcres.value))) - logs.append("\nNumber of parking spaces needed: " + str(int(xLength*yLength*floors/9))) + logs.append("Oak tree acres: {:.2f}", str(abs(oakTreeAcres.value))) + logs.append("Slash pine acres: {:.2f}", str(abs(slashPineAcres.value))) + logs.append("Eucalyptus tree acres: {:.2f}", str(abs(eucalyptusTreeAcres.value))) + logs.append("\nNumber of parking spaces needed: " + str(abs(int(xLength*yLength*floors/9)))) # get arguments from command line if len(sys.argv) == 4 or len(sys.argv) == 5: