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

This commit is contained in:
Dan Ballard 2013-01-30 20:47:41 -08:00
父節點 c6e7c0e1f3
當前提交 e58504c3f3
共有 1 個檔案被更改,包括 1 行新增1 行删除

查看文件

@ -17,7 +17,7 @@ if max < 1:
for cnt in range(3, max, 2) : for cnt in range(3, max, 2) :
testMax = math.sqrt(cnt)+1 testMax = math.sqrt(cnt)+1
isPrime = 1 isPrime = 1
for test in range(3, testMax, 2): for test in range(3, int(testMax), 2):
isPrime = cnt % test isPrime = cnt % test
if isPrime == 0: if isPrime == 0:
break break