/
rnekrasov
/
Python
Обзор
Документация
Войти
/
rnekrasov
/
Python
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
power_of_two.py
11 строк
324 B
slowy07
refactor: clean code
30 янв 2022, 04:33
30 янв 2022, 04:33
f0af0c4
Код
Авторство
О чём код?
# Simple and efficient python program to check whether a number is series of power of two # Example: # Input: # 8 # Output: # It comes in power series of 2 a = int(input("Enter a number")) if a & (a - 1) == 0: print("It comes in power series of 2") else: print("It does not come in power series of 2")