Include upper bound in range()
- by Jull
How can I include the upper bound in range() function? I can't add by 1 because my for-loop looks like:
for x in range(1,math.floor(math.sqrt(x))):
y = math.sqrt(n - x * x)
But as I understand it will actually be 1 < x < M where I need 1 < x <= M Adding 1 will completely change the result.
I am trying to rewrite my old program…