Question #209067

Write and execute a PYTHON program to perform separate files for each of the tasks

1.o find the prime numbers between 1000 and 2000 and display the prime numbers in deseeding order.


Expert's answer

 # Python program to display all the prime numbers between 1000 and 2000

m=1000

n=2000

print("Prime numbers between", m, "and", n, "are:")

for i in reversed(range(m, n + 1)):
   # all prime numbers are greater than 1
   if i > 1:
       for r in range(2, i):
           if (i % r) == 0:
               break
       else:
           print(i)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS