title: Determining the greatest common factor with Python
body: <p>I'm trying to determine the greatest common factor of two numbers in Python. This is what I've got. It makes sense to me, not so much to Python though. I'm not getting any specific error from Python. It just won't run.</p>
  
  <pre><code>def highestFactor(numX,numY):
      if numX &gt; numY:
          x = numY
      else:
          x = numX
      while x &gt; 1:
          if numX % x == 0 and numY % x == 0:
          print x
          break
  
      x -= 1
  
  highestFactor(8,22)
  </code></pre>
  
  <p>Any thoughts ?</p>