From 24b3966960a65775bfffca514600e2e47304d000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Fri, 28 Jan 2022 18:51:40 +0100 Subject: 002: Add python and elixir solutions --- 002.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 002.py (limited to '002.py') 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)))))) -- cgit v1.2.3