Question DSA-BIT-0008
MediumWhat is the output of this code?
def power_of_two(n):
return n > 0 and n & (n - 1) == 0
print(power_of_two(16), power_of_two(18))
- A.
False False
- B.
False True
- C.
Sign up free to see the answer and a step-by-step explanation.