title: Simple square root loop
body: <p>I'm trying to create a loop that squares each number in my range variable then finds the square root of that number. </p>
  
  <pre><code>import UIKit
  
  var range = 0..&lt;10
  var square = 0.0
  var root = 0.0
  
  for i in range {
      square = i * i
      root = sqrt(square)
      print(square)
  }
  </code></pre>
  
  <p>My error right now is "Cannot assign value of type Int to Double". I also get an error when converting my range variable to doubles.</p>
  
  <p>Thanks in advance for any help.</p>