Include upper bound in range()
<p>How can I include the upper bound in range() function? I can't add by 1 because my for-loop looks like:</p>

<pre><code>for x in range(1,math.floor(math.sqrt(x))):
    y = math.sqrt(n - x * x)
</code></pre>

<p>But as I understand it will actually be <code>1 &lt; x &lt; M</code> where I need <code>1 &lt; x &lt;= M</code> Adding 1 will completely change the result. 
I am trying to rewrite my old program from C# to Python. That's how it looked in C#:</p>

<pre><code>for (int x = 1; x &lt;= Math.Floor(Math.Sqrt(n)); x++)
    double y = Math.Sqrt(n - x * x);
</code></pre>
