title: TypeError: range() integer end argument expected, got float?
body: <p>I know this has been asked before, but the answers did not help me :/</p>
  
  <p>I created a function that runs a for loop over the squared max of the inputs, and by all accounts my code is correct...and yet it still asks for float inputs.</p>
  
  <pre><code>def spiral(X, Y):
  
  x = y = 0
  dx = 0
  dy = 0
  count = 0
  
  for i in range(max(X, Y)**2):
      if (-X/2.0 &lt; x &lt;= X/20) and (-Y/2.0 &lt; y &lt;= Y/2.0):
          print (x, y)
  
      if x == y or (x &lt; 0 and x == -y) or (x &gt; 0 and x == 1-y):
          dx, dy = -dy, dx
  
      x, y = x+dx, y+dy
  </code></pre>
  
  <p>print spiral(3.0,3.0)</p>
  
  <p>And I get this error: <code>TypeError: range() integer end argument expected, got float.</code></p>
  
  <p>But I put 3.0 when I try and print the function...so what am I missing?</p>
  
  <p>Thanks :)</p>