# futval.py # A program to compute the value of an investment # carried 10 years into the future def main(): print ("This program calculates the future value") print ("of a 10 year investment.") principal = float(input("Enter the initial principal: ")) apr = float(input("Enter the annualized interest rate: ")) years = int(input("Enter the number of years: ")) for i in range(years): principal = principal * (1.0 + apr) print ("The value in ", years, " years is:", principal) main()