I need a simple way to find whether the variable originalnumber
is a power of two. I'd rather avoid using functions, especially since I'm incredibly confused by parameters, so something like the division thing would be useful
This is in Python 3.
Something similar to how you find if a number is divisible by another number would be useful.
At first I had (just an example for what I'm looking for):
if originalnumber % 2 == 0:
print("is power of 2")
else:
print("is not power of 2")