summaryrefslogtreecommitdiff
path: root/Problem2.py
blob: 6dd8f6700ce50ef68715cde14b283c66340affe8 (plain)
1
2
3
4
5
6
7
8
9
10
a, b = 1, 2
sum = 0
while a < 4000000:
    print(a)
    if a % 2 == 0:
        sum = sum + a
    a, b = b, a+b
print(sum)