Answer:
In Python:
def is_power(n):
if n > 2:
n = n/2
return is_power(n)
elif n == 2:
return True
else:
return False
Step-by-step explanation:
This defines the function
def is_power(n):
If n is greater than 0
if n > 2:
Divide n by 2
n = n/2
Call the function
return is_power(n)
If n equals 2
elif n == 2:
Return True
return True
If n is less than 2
else:
Then, return false
return False