Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count = 0
- n = 1
- while count < 1000:
- n = n + 1
- divisors = 0
- for testdiv in range(1,n+1):
- testrem = n%testdiv
- if testrem == 0:
- divisors = divisors + 1
- if divisors < 3:
- count = count + 1
- print ("the thousandth prime number is", n)
Advertisement
Add Comment
Please, Sign In to add comment