Need help with fixing this program

profileSultan99899
program4-1.py

initialSavings = 0.0 years = 0 interest = 0.0 totalReturn = 0.0 #Get Input print("\t\t##ENTER IN THE PROMPTS BELOW NUMERIC INFORMATION FOR YOUR SAVINGS##\n") while True: #Input prompt with exception handling for deposit prompt try: savings = float(input("\nPlease enter the amount of money you want to deposit: $")) except ValueError: print("\n\tInvalid input for the deposit!") print("\t Please try again.") continue else: break while True: #Input prompt with exception handling for interest rate prompt try: interestRate = float(input("\nPlease enter the interest rate (as decimal (e.i. .07 for 7%)): ")) except ValueError: print("\n\tInvalid input for the interest rate!") print("\t Please try again.") continue else: break while True: #Input prompt with exception handling for year prompt try: years = int(input("\nPlease enter the number of years to save the amount: ")) except ValueError: print("\n\tInvalid input for the year!") print("\t Please try again.") else: break #Initial Output print("\n\n\n\t\t\t******SAVINGS INFORMATION******") print("\n\tThe initial deposit is: $", format(savings,',.2f'), sep='') print("\tThe number of years to save the amount is:", years, "years") print("\tThe interest rate to calculate compounded annual savings is:", format(interestRate, '.2%')) print("\n") print("\t{0:6s} {1:>10s} {2:>12s} {3:>14s}{4:>14s}".format(" ", "Beginning", " ", "Total ", " Ending")) print("\t{0:6s} {1:>10s} {2:>12s} {3:>14s}{4:>14s}".format("Year", "Balance ", "Interest", "Interest", "Balance")) print("\t-------------------------------------------------------------") #Loop to calculate amortization schedule for loan for yrs in range(years): interest = savings * interestRate #Loop calculation savings = savings + interest #Loop calculation totalInterest = totalInterest + interest #Loop calculation print("\t{0:2d}{1:14,.2f}{2:12,.2f}{3:>16,.2f}{4:>16,.2f}".format(yrs + 1, savings - interest, interest, totalInterest, savings)) initialSavings = savings - totalInterest #Calculation for final output totalReturn = totalInterest/initialSavings #Calculation for final output #Final output print("\n\n\tTotal interest on the savings for ", years, " years is: $", format(totalInterest,',.2f'), sep='') print("\tTotal return on the initial $", format(savings - totalInterest, ',.2f'), " savings is: ", format(totalReturn, '.1%'), sep='') print("\tThe final amount in the savings account at the end of ", years, " years is: $", format(savings,',.2f'), sep='')