title: Sum of even fibonacci numbers below 4 million - Python
body: <p>I'm attempting the second Project Euler question in python and want to understand why my code doesn't work.</p>
  
  <p>This code finds the sum of even Fibonacci numbers below 4 million</p>
  
  <pre><code>counter = 2
  total = 0
  while counter &lt;= 4000000:
      if counter % 2 == 0:
          total+= counter    
      counter+= (counter -1)
  print total
  </code></pre>
  
  <p>This code will output: 2</p>
  
  <p>If I print the counter it outputs: 4194305</p>
  
  <p>I'm assuming it's an issue with the if statement being executed as the while loop is functioning correctly and the counter is also incrementing correctly.</p>