aboutsummaryrefslogtreecommitdiffstats
path: root/10001prime.py
diff options
context:
space:
mode:
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])