title: How to loop through a percentage investment?
body: <p>I'm working on this simple task where a financial advisor suggests to invest in a stock fund that is guaranteed to increase by 3 percent over the next five years. </p>
  
  <p>Here's my code:</p>
  
  <pre><code>while True:
      investment = float(input('Enter your initial investment: '))
      if 1000 &lt;= investment &lt;= 100000:
          break
      else:
          print("Investment must be between $1,000 and $100,000")
  
  
  #Annual interest rate 
  apr = 3 / 100
  amount = investment
  
  for yr in range(5):
      amount = (amount) * (1. + apr)
      print('After {:&gt;2d} year{} you have:   $ {:&gt;10.2f}'.format(yr, 's,' if yr &gt; 1 else ', ', amount))
  </code></pre>