Your question is Power of Two Check. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given an integer n, determine whether it is a power of 2. A number is a power of 2 if it can be written as 2^k for some integer k >= 0.
Implement a function that returns True if n is a power of 2, and False otherwise.
nTrue only when n is a positive power of 2.def is_power_of_two(n):