human
Check if number is palindrome or not in base B | Function to check if N in base B is palindrome or not.
Stores the reverse of N.
Stores the value of N.
Extract all the digits of N.
Generate its reverse.
Driver code"
Solution in Python:

=====
Write me a code to check if number is palindrome or not in base B and the other steps required?
assistant
#Here is code to check if number is palindrome or not in base B and the other steps required.
 def checkPalindromeB ( N , B ) :
	rev = 0 ;
	N1 = N ;
	while ( N1 > 0 ) :
		rev = rev * B + N1 % B ;
		N1 = N1 // B ;
	return N == rev ;
if __name__ == ' _ _ main _ _ ' :
	N = 5 ; B = 2 ;
	if ( checkPalindromeB ( N , B ) ) :
		print ( " Yes " ) ;
	else :
		print ( " No " ) ;