Create a list of all the prime numbers from 100 to 1000 using a function.
Write a python program.
Answers
Answered by
1
lst=[]
for n in range(100,1001):
if n>1:
for i in range (2,int(n/2)):
if n%i==0:
break
else:
lst.append(n)
break
print("List of prime no.s from 100 to 1000 :-\n",lst)
✨
Similar questions