Prime numbers finder.

The code which displays all prime numbers having 3 digits and starting with 5
mail@pastecode.io avatar
unknown
python
3 years ago
272 B
1
Indexable
Never
lower = 500
upper = 600

print("Prime numbers between " +str(lower), "and " +str(upper), "are:")

for num in range(lower, upper):
   if num > 1:
       for i in range(2, num):
           if (num % i) == 0:
               break
       else:
           print(num)