aboutsummaryrefslogtreecommitdiffstats
path: root/10001prime.py
diff options
context:
space:
mode:
authormjfernez <mjfernez@gmail.com>2020-02-03 19:49:58 -0500
committermjfernez <mjfernez@gmail.com>2020-02-03 19:49:58 -0500
commite6a7399134b3dc08f9e6e9c9c74e39ac449b8538 (patch)
tree2cd7b6ba1a10562d219028aa84aedfc49d872761 /10001prime.py
parentd62ba829dc3a54edc46b7deb581dd244713393f5 (diff)
downloadProject_Euler_Solutions-e6a7399134b3dc08f9e6e9c9c74e39ac449b8538.tar.gz
Fix dumb mistakes
Diffstat (limited to '10001prime.py')
-rw-r--r--10001prime.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/10001prime.py b/10001prime.py
index ecf8139..ecaa8cd 100644
--- a/10001prime.py
+++ b/10001prime.py
@@ -1,5 +1,4 @@
import PIL, math
-import numpy as np
#Problem 7 - 10,001st prime
@@ -8,7 +7,7 @@ def listprimes(number):
primes = []
if (number <=1):
return [1]
- a = np.ones(number)
+ a = [1] * number
a[0]=0
a[1]=0#1 and 0 are not prime
##Sieve of eratosthenes
@@ -26,6 +25,6 @@ def listprimes(number):
return primes
out_list = listprimes(1000000)
-print out_list
+#print(out_list)
#return 10,001th prime factor
-print out_list[10000]
+print(out_list[10000])