title: Using python to find even Fibonacci numbers
body: <p>Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:</p>
  
  <blockquote>
    <p>1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ..</p>
  </blockquote>
  
  <p>By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. 
  This is how I am doing it, but I am getting the wrong value, and I am not sure why.  </p>
  
  <pre><code>Sum=0
  n=0
  a=1
  b=2
  while a&lt;=4e6 and b&lt;=4e6:
      if a%2==0:
          Sum = Sum + a
      n=a+b
      a=b
      b=n
  if b%2==0:
      sum=sum+b
  print(Sum)
  </code></pre>
  
  <p>My value is 1089154 which is incorrect.</p>