判断 101-200 之间有多少个素数,并输出所有素数
参考代码:
import math for i in range(100,200): for j in range(2,round(math.sqrt(i))+1): if i%j==0: break else: print(i)