>>> def isprime(num) :
if num%2 == 0 :
if num == 2 :
return True
else :
return False
for k in range(3, int(math.sqrt(num))+1, 2) :
if num%k == 0 :
return False
else :
return True
>>> while n != 10001 :
number += 2
if isprime(number) :
n += 1
else :
print(number)
댓글 없음:
댓글 쓰기