aboutsummaryrefslogtreecommitdiffstats
path: root/002.py
diff options
context:
space:
mode:
Diffstat (limited to '002.py')
-rw-r--r--002.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/002.py b/002.py
new file mode 100644
index 0000000..4edd181
--- /dev/null
+++ b/002.py
@@ -0,0 +1,8 @@
+def fibo(max):
+ a, b = 1, 2
+ while a < max:
+ yield a
+ a, b = b, a + b
+
+
+print(sum(list(filter(lambda n: n % 2 == 0, list(fibo(4000000))))))
remember that computers suck.