We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 00c13c2 + 92e0aa2 commit c423419Copy full SHA for c423419
Project Euler/Problem 01/sol4.py
@@ -0,0 +1,32 @@
1
+def mulitples(limit):
2
+ xmulti = []
3
+ zmulti = []
4
+ z = 3
5
+ x = 5
6
+ temp = 1
7
+ while True:
8
+ result = z * temp
9
+ if (result < limit):
10
+ zmulti.append(result)
11
+ temp += 1
12
+ continue
13
+ else:
14
15
+ break
16
17
+ result = x * temp
18
19
+ xmulti.append(result)
20
21
22
23
24
25
+ return (sum(zmulti) + sum(xmulti))
26
+
27
28
29
30
31
32
+print (mulitples(100))
Project Euler/Problem 02/sol2.py
@@ -0,0 +1,13 @@
+def fib(n):
+ ls = []
+ a,b = 0,1
+ n += 1
+ for i in range(n):
+ if (b % 2 == 0):
+ ls.append(b)
+ pass
+ a,b = b, a+b
+ print (sum(ls))
+ return None
+fib(10)
0 commit comments