title: in range loop skipping through
body: <pre><code>    salary=0
  salaryArray=[]
  loop=0
  noYears=int(input(&quot;How many years do you want to do salaries for? &quot;))
  for i in range(0,noYears):
      while loop==0:
          print()
          print(&quot;You can add multiple sources of income, one at a time&quot;)
          salaryType=input(&quot;Do you want to put in your salary hourly or yearly? (h/y) &quot;)
          if salaryType==&quot;y&quot;:
              salarySection=float(input(&quot;What is your salary? &quot;))
              salary=salarySection+salary
          else:
              salaryHourly=float(input(&quot;What are you payed per hour? &quot;))
              salaryWeekly=float(input(&quot;How many hours per week will you work? &quot;))
              salaryYearly=float(input(&quot;How many weeks per year will you work? &quot;))
              print()
              salarySection=salaryHourly*salaryWeekly*salaryYearly
              salary=salary+salarySection
          
          repeat=input(&quot;Do you wish to add another source of income? (y/n) &quot;)
          if repeat==&quot;n&quot;:
              print(&quot;This year's anual salary is&quot;, salary)
              salaryArray.append(salary)
              loop=1
  </code></pre>
  <p>For some reason the <code>for i in range(0,noYears)</code> isn't working?
  It just moves on to the next line of code after doing it through once - even though I put the answer to noYears as 3.</p>
  <p>Anyone know why this might be as I cannot see what is wrong?
  :)</p>