/problem_02/problem_02.py
Python | 15 lines | 11 code | 3 blank | 1 comment | 2 complexity | bc2cd4a4e99a7e6dd49c8d2fa527bd0a MD5 | raw file
1#!/usr/bin/python 2 3a1 = 1 4a2 = 2 5an = 0 6total = 0 7while an < 4000000: 8 an = a1 + a2 9 if an % 2 == 0: 10 total += an 11 12 a1 = a2 13 a2 = an 14 15print total + 2