n. Return True if n equals 4ᵏ for some integer k ≥ 0, and False otherwise.
With a loop it is easy; try to do it without loops or recursion.n=64 → True
64 = 4 · 4 · 4 = 4³.
n=8 → False
8 is a power of two but not of four: 4¹ = 4 and 4² = 16.
n=1 → True
1 = 4⁰.
n=64
True
Run checks the first 3 tests in your browser. Submit checks all 44 tests on the server, hidden ones included.