answersLogoWhite

0

Here's a start

umbers=[True]*5001

index=2

primes=[]

while index<5000:

multiplier=2

while index*multiplier <= 5000:

Numbers[index*multiplier]=False

multiplier+=1

index+=1

while Numbers[index]==False and index < 5000:

index+=1

for x in range(0,5000):

if Numbers[x]==True:

primes.append(x)

x+=1

print primes

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao
JudyJudy
Simplicity is my specialty.
Chat with Judy

Add your answer:

Earn +20 pts
Q: Solution to find 1000th prime number using python?
Write your answer...
Submit
Still have questions?
magnify glass
imp