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?

1099 is not prime. 1099 = 7 * 157


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 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 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.


What is a solution in math?

The answer is the solution to the problem so you are about to solve it with an answer which is the solution. Did you get that?A solution is:"A means of solving a problem or dealing with a difficult situation.The correct answer to a puzzle."When specific to maths, a solution is an answer that fulfills certain criteria, or solves a specific problem. If you have found a solution you have found an answer to the question that works in every case. NOT NECESSARILY A NUMBERA number is even and prime. If you say 8, you have not found a solution because although 8 is even, it is not prime. 2 however is a solution because 2 is both even and prime (the only even prime)One problem can, however, have multiple solutions. If you write the equation:x+3=4you can solve to give x=1.But if you write:x2=4it solves to give x= &plusmn;2 (+2 OR -2)When doing applied maths, eg. like Dijkstra's algorithm the solution will be the shortest route from node A to node B. This is not a number, but a pathway.


What is you called when the prime factorization of a number is 1 and itself?

You is called a prime number!You is called a prime number!You is called a prime number!You is called a prime number!