title: Better way to approximate the square root using exhaustive enumeration?
body: <p>This is the best way I have found, using the least processor:</p>
  
  <pre><code>x = 25
  epsilon = 0.001
  step = epsilon**2
  numGuesses = 0
  ans = 0.0
  while abs(ans**2 - x) &gt; epsilon and ans &lt;=x:
      ans += step
      numGuesses += 1
  print 'numGuesses =', numGuesses
  if abs(ans**2 - x) &gt;= epsilon:
      print 'Failed on square root of number', x
  else:
      print ans, 'is close to square root of', x
  </code></pre>
  
  <p>for numbers greater one</p>