https://leetcode.com/problems/power-of-two/submissions/
class Solution:
def isPowerOfTwo(self, n: int) -> bool:
while n > 1:
remainder = n % 2
if remainder != 0:
return False
n = n // 2
return n == 1