📜  python程序以间隔打印素数 - Python代码示例

📅  最后修改于: 2022-03-11 14:45:39.072000             🧑  作者: Mango

代码示例1
lower = 800
upper = 900
print("Print the number's from ",lower," and ",upper,".")
for num in range(lower,upper + 1):
  if num > 1:
    for i in range(2, num):
      if (num % i) == 0:
        break
    else:
      print(num)