title: python 3 - math.sqrt - a float is required
body: <p>I am trying to use a square root as the count for a counted loop, but I keep getting the error "a float is required." I have tried every way that I can think of to convert the value provided by math.sqrt to a float, but I am still getting the message.</p>
  
  <p>Code:</p>
  
  <pre><code>from random import randrange
  import math
  
  
  def getInfo():
  
      tilesNum = float(input("Please enter number of tiles now: "))
  
  
  
  def procedure(tilesNum):
  
      countX = 0
  
      SqRoot = float(math.sqrt(tilesNum))
  
      print(SqRoot)
  
      for i in range(float(SqRoot)):
  
          countX = countX + 1
          countY = 0
  
  
          for i in range(float(SqRoot)):
              countY = countY + 1
              terrain = randrange(1, 5)
  
              if terrain == 1:
                  print("terrain on tile", countX, countY, "is frozen")
  
              elif terrain == 2:
                  print("terrain on tile", countX, countY, "is flooded")
  
              elif terrain == 3:
                  print("terrain on tile", countX, countY, "is impeded by   rocks")
  
              else:
                  print("terrain on tile", countX, countY, "is overgrown")
  
  
  
  
  def main():
  
      tilesNum = getInfo()
  
      procedure(tilesNum)
  
  main()
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\Rainy\AppData\Local\Programs\Python\Python35\PBA prototype (problem).py", line 50, in &lt;module&gt;
      main()
    File "C:\Users\Rainy\AppData\Local\Programs\Python\Python35\PBA prototype (problem).py", line 48, in main
      procedure(tilesNum)
    File "C:\Users\Rainy\AppData\Local\Programs\Python\Python35\PBA prototype (problem).py", line 15, in procedure
      SqRoot = float(math.sqrt(tilesNum))
  TypeError: a float is required
  </code></pre>
  
  <p>Any help is greatly appreciated! </p>
  
  <ul>
  <li>Rainy</li>
  </ul>