Project euler (in case you don't know: <a href="http://projecteuler.net">projecteuler.net</a>)<br><br>I'm trying to do the third one and here's my current code:<br><br>  1 def checkPrime (x):<br>  2     factors=2;<br>
  3     while factors<=x:<br>  4         if x==factors:<br>  5             return True;<br>  6         elif x%factors==0:<br>  7             return False;<br>  8         elif x%factors!=0:<br>  9             factors=factors+1;<br>
 10<br> 11 factorl=[];<br> 12 factors=600851475142;<br> 13<br> 14 while factors != 1:<br> 15     if 600851475143%factors==0:<br> 16         if checkPrime(factors)==True:<br> 17             print factors;<br> 18         else:<br>
 19             factors=factors-1;<br> 20<br> 21     else:<br> 22         factors=factors-1;<br> 23<br><br>And it just gets frozen when I run it. I put a <br><br>print "Loop completed"<br><br>in one of the loops and it showed up just fine. So, there are two possibilities:<br>
1. Its looping in the trillions and taking a while<br>2. I have a forever loop somewhere<br>