title: Converting Fortran 77 code to Python
body: <p>I have looked at this Q/A <a href="https://stackoverflow.com/questions/45719258/what-is-the-intent-of-this-fortran-77-code">Intent of this Fotran77 code</a> and I have almost converted the below Fortran77 style code into Python 3.x except I had a doubt where the i = i + 1 should be placed in the Python version. As mentioned in the comments of the linked question I have done the conformance tests and the results are off by a margin of 2. Hence the question. </p>
  
  <pre><code>i = 0
  500 continue
  i = i +1
  if (i .le. ni) then
    if (u(i,j-1) .gt. -9999.) then
       r(1,j) = u(i,j-1)
       go to 600
    else
      missing = i
      go to 500
    end if
   end if
  600  continue
  </code></pre>
  
  <p>Here is my Python version </p>
  
  <pre><code>  i = 0
    while (i &lt;= ni):
       i = i+1
       if (u[i,j-1] &gt; -9999.0):
           r[0,j] = u[i,j-1]
           break
       else:
         missing = i
  </code></pre>
  
  <p>Did I place the increment counter at the right location ? </p>