In: Computer Science
Write a Python program that prompts the user for a dollar amount to place in savings, the amount of interest per year, and the amount of years you decide to keep it there. The program will calculate how much money you will have each year. Use loops in your calculations and Use the loop below:
for year = 1 to X
savings = savings * interestRate
""" Python program - saving calculator """ savings = int(input('Enter savings: ')) interestRate = float(input('Enter rate of interest: ')) year = int(input('Enter years: ')) print("Money saved each year -") for i in range(year): savings = savings * interestRate print("Year {}: {}".format(i+1, savings)) # Program ends here
Note: For queires, drop me a comment.