Computer Science, asked by sarin465545, 4 months ago

Create a list of all the prime numbers from 100 to 1000 using a function.
Write a python program.

Answers

Answered by harshvirsing55
1

\huge\pink{\mid{\underline{\overline{\tt Answer :-}}\mid}}

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)

\orange{\tt Hope it will} \green{\tt help you.}

Similar questions