solutions 7 8 9

This commit is contained in:
JellyWX
2017-06-21 21:20:47 +01:00
parent 1231e9562e
commit 42c8b5f771
4 changed files with 55 additions and 0 deletions

15
problem7.py Normal file
View File

@ -0,0 +1,15 @@
primes = [2,3,5,7,11,13]
num = 15
while len(primes) < 10001:
prime = True
for p in primes:
if num % p == 0:
prime = False
break
if prime:
primes.append(num)
num += 2
print(primes)