We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05f854f commit 57f7044Copy full SHA for 57f7044
perfect_square.py
power_of_two.py
@@ -0,0 +1,11 @@
1
+# Simple and efficient python program to check whether a number is series of power of two
2
+# Example:
3
+# Input:
4
+# 8
5
+# Output:
6
+# It comes in power series of 2
7
+a = int(input("Enter a number"))
8
+if a & (a - 1) == 0:
9
+ print("It comes in power series of 2")
10
+else:
11
+ print("It does not come in power series of 2")
0 commit comments