lower = int("900")
upper = int("1000")

for num in range(lower,upper + 1):
      if num > 1:
              for i in range(2,num):
                      if (num % i) == 0:
                              break
              else:
                      print(num)
Вывод результата:
907
911
919
929
937
941
947
953
967
971
977
983
991
997


 Похожие публикации
2015-11-30 • Просмотров [ 334 ]