Browse Source

fir type error (float != int) for apparently more strict python

master
Dan Ballard 10 years ago
parent
commit
e58504c3f3
  1. 2
      primes.py

2
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

Loading…
Cancel
Save