Answer:
try this
Step-by-step explanation:
def SieveOfEratosthenes(n):
prime = [True for i in range(n+1)]
p = 2
while (p * p <= n):
if (prime[p] == True):
for i in range(p * p, n+1, p):
prime[i] = False
p +=1
c=0
for p in range(2, n):
if prime[p]:
print(p," ",end=" ")
c=c+1
if(c==10):
print("")
c=0
n= 1000
print("prime number between 2 to 999 as determined by seive of eratostenee ")
SieveOfEratosthenes(n)