jeudi 29 octobre 2020

How to use an IF statement to change a variable in python

Hi im really new to coding so if this seems dumb sorry but I cannot firgure this out for the life of me maybe I just cant use this method?

propLW = float(propLength) * float(propWidth)
copyPropLW = float(propLength) * float(propWidth)
# VVV I could really use help on adding this surcharge im not sure how to do it VVV
if propLW >= overSqftSurcharge:
    print("Adding a $500 surcharge")
    propLWCost = copyPropLW + overSqftSurcharge
elif propLW <= overSqftSurcharge:
    print("No surcharge")
    

treeNumValue = float(treeNum) * float(treeCost)
grassPropLW = propLWCost * grassTypeCost
totalCost = baseLabour + float(treeNumValue) + float(grassPropLW)

Aucun commentaire:

Enregistrer un commentaire