Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- number = 5
- prime_count= 2
- listofPrimes=[2,3]
- while prime_count < 1001:
- cud_b_prime = True
- divisor = 2
- while divisor < number:
- if number % divisor ==0:
- cud_b_prime = False
- divisor +=1
- if cud_b_prime:
- listofPrimes.append(number)
- prime_count +=1
- number += 2
- print listofPrimes[-1]
Advertisement
Add Comment
Please, Sign In to add comment