# 判定一个数是否为质数
j = 2 # 帮助构造数字范围
while j<=1000:
i = 2
while i < j:
if j % i == 0:
print(j,"不是质数")
break
i += 1
else:
print(j,'是质数')
j += 1
for i in range(2,1001):
for j in range(2,i):
if i%j==0:
print(f'{i}不是质数')
break
else:
print(f'{i}是质数')