Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for candiPrimes in range(2,410): #Test Primes Numbers from 2 to 410
- divisor = 1
- NumOfReTimes = 0 #Count how many remainder 0 will show up
- while (divisor<=candiPrimes): '''Analogy: Numbers start from 2 / N times if two remainder 0 will show up and the number is Prime'''
- if candiPrimes % divisor == 0:
- NumOfReTimes += 1
- divisor += 1
- if NumOfReTimes == 2: #test if two remainder 0 did show up
- print ' ' + str(candiPrimes),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement