请问有人请告诉我这段代码我做错了什么?无论如何,它只是打印'计数'.我只想要一个非常简单的素数发生器(没什么特别的).
import math
def main():
count = 3
one = 1
while one == 1:
for x in range(2, int(math.sqrt(count) + 1)):
if count % x == 0:
continue
if count % x != 0:
print count
count += 1
Run Code Online (Sandbox Code Playgroud)