title: Future Value of yearly investments
body: <p>Suppose you have an investment plan where you invest a certain fixed amount at the beginning of every year. Compute the total value of the investment at the end of the last year. The inputs will be the amount to invest each year, the interest rate, and the number of years of the investment.</p>
  
  <p>This program calculates the future value
  of a constant yearly investment.
  Enter the yearly investment: 200
  Enter the annual interest rate: .06
  Enter the number of years: 12
  The value in 12 years is: 3576.427533818945</p>
  
  <p>I've tried a few different things, like below, but it doesn't give me that 3576.42, it gives me only $400. Any ideas?</p>
  
  <pre><code>principal = eval(input("Enter the yearly investment: "))
  apr = eval(input("Enter the annual interest rate: "))
  years = eval(input("Enter the number of years: "))
  for i in range(years):
      principal = principal * (1+apr)
  print("The value in 12 years is: ", principal)
  </code></pre>