answersLogoWhite

0


Best Answer

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

13y ago
This answer is:
User Avatar

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
Related questions

What is the 1000th prime number?

7919.


What is the 1001st prime number?

The 1000th is 7919, so the 1001st is 7927.


Is 1099 a prime number or a composite number?

Solution: 1099 is a prime number.


Prints the 1000th prime number?

// Print prime number series. class prime { void main () { int i = 1; int C = 0; int n = 1; int X = 0; while (X != 1000) { if ( n % i n ) { C = 0; n++ ; i = 0; } } i++ ; } } }


What are the prime factors of 1 2 3 4 5 and 6?

the Correct Prime Number To This Number indication Is 1 , 2 , 3 , &amp; 5 Thank You . The Solution


What two prime numbers add up to 65?

There's no solution. For two primes to add to an odd number, one of them would have to be two. 63 isn't prime, so there's no solution.


How is the decimal 0.67 written as a fraction?

67/100 is the only solution. The number 67 is prime.


Python function that lists prime numbers?

If you just want a hint: One way to check whether a number is prime is by dividing it by any number between 2 and the square root of your number. If the number divides by any of these, it is not prime. If you want the code: import math for num in range(1,101): if all(num%i!=0 for i in range(2,int(math.sqrt(num))+1)): print num


What is the solution considered to be if it has an equal number of H and OH- ions?

A solution that contains equal concentrations of hydrogen and hydroxide ions is neutral. Water is the prime example.


What two prime numbers add together to make 97?

The only way two prime numbers add up to an odd number is if one of them is 2. Since 95 isn't prime, there is no solution.


What two prime numbers add up to 35?

For two primes to add up to an odd number, one of them has to be two. 33 isn't prime, so there is no solution.


What are all prime numbers between 70 and 90 with solution?

They are: 71 73 79 83 and 89 Any prime number has only two factors which are itself and one.