From e58504c3f39eefdc1e9da7c06341b0d350d9705e Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Wed, 30 Jan 2013 20:47:41 -0800 Subject: [PATCH] fir type error (float != int) for apparently more strict python --- primes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primes.py b/primes.py index e3cdf36..555a784 100755 --- a/primes.py +++ b/primes.py @@ -17,7 +17,7 @@ if max < 1: for cnt in range(3, max, 2) : testMax = math.sqrt(cnt)+1 isPrime = 1 - for test in range(3, testMax, 2): + for test in range(3, int(testMax), 2): isPrime = cnt % test if isPrime == 0: break