Skip to content

Commit

Permalink
Create SolutionByDhaval.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dhavalpandey authored Oct 29, 2023
1 parent b7cbc6c commit 2c9dd2e
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
int = int(input())


def checkPowerOfTwo(num):
power = 0
isPower = "No"

while power <= int:
if 2 ** power == int:
isPower = "Yes"
break
else:
power += 1

return isPower


print(checkPowerOfTwo(int))

0 comments on commit 2c9dd2e

Please sign in to comment.