human
What is a code to reversible numbers and the other steps required given the following:
Reversible numbers | Function to check reversible number.
Calculate reverse of n.
Calculate sum of number and its reverse.
Check for reverse number reach digit must be odd.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to reversible numbers and the other steps required.
 def checkReversible ( n ) :
	rev = 0
	flag = n
	while ( flag != 0 ) :
		rem = flag % 10
		rev *= 10
		rev += rem
		flag //= 10
	sum = rev + n
	while ( sum and ( ( rem % 2 ) != 0 ) ) :
		rem = sum % 10
		sum //= 10
	if ( sum == 0 ) :
		print ( " Reversible ▁ Number " )
	else :
		print ( " Non - Reversible ▁ Number " )
n = 36
checkReversible ( n )