Hello team,
Some tell me why the below code fails for isPowerOfTwo: Python
'''
class Solution:
def isPowerOfTwo(self, n: int) -> bool:
import numpy as np
if n<=0:
return "false"
elif n>0:
x = np.log(n)/np.log(2)
i=int(x)
if 2**i==n:
return "true"
else:
return "false"
'''