loading
open in
main.py
1
2
3
4
5
6
7
s, x, y = 0, 0, 2
L = int(input('Sum of even Fibonacci numbers <'))

while y < L:
    s, x, y = s+y, y, 4*y+x

print "is", s
Python 2.7.10 (default, Jul 14 2015, 19:46:27) [GCC 4.8.2] on linux