Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #assignment 1,compute and print the 1000th prime number
- c = 1 #count of prime numbers
- p = 3 #number to be evaluated for prime
- while c < 1000:
- for i in range(2, p):
- if p%i !=0:
- c = c+1
- p = p+2
- else:
- c = c
- p = p+2
- print p
Advertisement
Add Comment
Please, Sign In to add comment