human
What is a code to adam Number and the other steps required given the following:
Adam Number | To reverse Digits of numbers.
To square number.
To check Adam Number.
Square first number and square reverse digits of second number.
If reverse of b equals a then given number is Adam number.
Driver program to test above functions"
How can the above be solved in Python?
assistant
#Here is code to adam Number and the other steps required.
 def reverseDigits ( num ) :
	rev = 0
	while ( num > 0 ) :
		rev = rev * 10 + num % 10
		num /= 10
	return rev
def square ( num ) :
	return ( num * num )
def checkAdamNumber ( num ) :
	a = square ( num )
	b = square ( reverseDigits ( num ) )
	if ( a == reverseDigits ( b ) ) :
		return True
	else :
		return False
num = 13
if ( checkAdamNumber ( num ) ) :
	print " Adam ▁ Number "
else :
	print " Not ▁ a ▁ Adam ▁ Number "