Advertisement
Guest User

Untitled

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