Advertisement
Guest User

Untitled

a guest
May 21st, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def PrintPrimes():
  2.    
  3.  
  4.     for candiPrimes in range(2,410):
  5.         divisor = 1
  6.         NumOfReTimes = 0
  7.        
  8.         while (divisor<=candiPrimes):
  9.             #print str(candiPrimes) + ' / ' + str(divisor)
  10.             if candiPrimes % divisor == 0:
  11.                 NumOfReTimes += 1
  12.             divisor += 1
  13.    
  14.         #print ' ' #New Line
  15.         if NumOfReTimes == 2:
  16.             print ' ' + str(candiPrimes),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement