python · BEGINNER · Public challenge
Power of Two
Challenge
Read a positive integer n and print Yes if it is a power of two (1, 2, 4, 8, ...), otherwise print No.
Example
Input: 1024
Output: Yes
- Math
- Loops
- Conditionals
- Python
python · BEGINNER · Public challenge
Read a positive integer n and print Yes if it is a power of two (1, 2, 4, 8, ...), otherwise print No.
Example
Input: 1024
Output: Yes