Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- def isPrime(num):
- for x in range(2, num):
- if ((num % x) == 0):return 0
- return 1
- sum = 0
- count = 0
- index = 1
- while True:
- index = index + 1
- if(isPrime(index) == 1):
- count = count + 1
- sum = sum + index
- if(count == 250):break
- print sum
Advertisement
Add Comment
Please, Sign In to add comment