def getAmount(expense): return float(input("Enter the amount you pay for " + expense + " in the form xx.yy")) def getTimes(): return float(input("Now please enter the number of times per year this cost is incurred.")) def main(): annualCosts = 0 annualCosts = annualCosts + getAmount("loan payment") * getTimes() annualCosts = annualCosts + getAmount("insurance") * getTimes() annualCosts = annualCosts + getAmount("gas") * getTimes() annualCosts = annualCosts + getAmount("oil") * getTimes() annualCosts = annualCosts + getAmount("maintanence") * getTimes() print("Your total monthly cost is $",format(annualCosts / 12,",.2f"),sep = "") print("Your total annual cost is $",format(annualCosts,",.2f"),sep = "") main()