Code runs in trinket but throws error here - float received for range end


#1

import math

class Solution:
# @param A : integer
# @return an integer
def isPower(self, A):
i = math.floor(math.sqrt(A))
print(i)
for x in range(2, i+2):
for y in range(2, i+2):
if xy == A or yx == A: # x to the power y or y to the power x
return True
return False

obj = Solution()
print(obj.isPower(536870912))