title: Python - get while loop to run a certain amount of times
body: <p>I am trying to get a <code>while</code> loop to function <code>dur</code> amount of times, however when I run it it just sits there, I assume calculating, seemingly forever. It is a simple script that shouldn't take very long to run, so I assume I have messed up the <code>while</code> loop.</p>
  
  <p>Here is the code:
      #Compound interest calculator</p>
  
  <pre><code>print "Enter amounts without $, years or %"
  loan = input("How many dollars is your loan? ")
  dur = input("How many years is your loan for? ")
  per = input("What percent is the interest on your loan? ")
  percent = per / 100
  count = 0
  
  #First calculation of amount
  first = loan * percent
  count = count + 1
  
  #Continued calculation occurs until count is equal to the duration set by the user
  while count &lt;= dur:
      out = first * percent
  
  #Prints output
  output = out + loan
  print str(output)
  </code></pre>