human
Check if a number is power of k using base changing method | Python program to check if a number can be raised to k.
loop to change base n to base = k.
Find current digit in base k.
If digit is neither 0 nor 1.
Make sure that only one 1 is present ..
Driver code"
Solution in Python:

=====
Can you provide a code to check if a number is power of k using base changing method and the other steps required?
assistant
#Here is code to check if a number is power of k using base changing method and the other steps required.
 def isPowerOfK ( n , k ) :
	oneSeen = False
	while ( n > 0 ) :
		digit = n % k
		if ( digit > 1 ) :
			return False
		if ( digit == 1 ) :
			if ( oneSeen ) :
				return False
			oneSeen = True
		n //= k
	return True
n = 64
k = 4
if ( isPowerOfK ( n , k ) ) :
	print ( " Yes " )
else :
	print ( " No " )