Skip to content

Commit 92e0aa2

Browse files
Add files via upload
1 parent 1568432 commit 92e0aa2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: Project Euler/Problem 02/sol2.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
def fib(n):
2+
ls = []
3+
a,b = 0,1
4+
n += 1
5+
for i in range(n):
6+
if (b % 2 == 0):
7+
ls.append(b)
8+
else:
9+
pass
10+
a,b = b, a+b
11+
print (sum(ls))
12+
return None
13+
fib(10)

0 commit comments

Comments
 (0)