Write is_power_of_two(n) using a while loop that keeps halving.
is_power_of_two(n)
while
is_power_of_two(16) → True
is_power_of_two(12) → False
Submit runs 6 tests, including hidden edge cases.
Run your code to see the output here.