Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import*
- x=3
- count=1
- listOfprimes=[2]
- while count < 1000:
- is_prime = True
- for y in range (2,int(sqrt(x)+1)):
- if x%y == 0:
- is_prime = False
- if is_prime:
- listOfprimes.append(x)
- count+=1
- x +=2
- print listOfprimes[-1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement