# Otherwise, return false.An integer n is a power of four, if there exists an integer x such that n == 4x.
from math import log,ceil,floor
def check(n):
return ceil(log(n,4)) == floor(log(n,4))
print("The Number is power of 4?: ",check(int(input("Enter Number: "))))
# Coded by Saahil
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP