human
Product of N with its largest odd digit | Function to return the largest odd digit in n.
If all digits are even then - 1 will be returned.
Last digit from n.
If current digit is odd and > maxOdd.
Remove last digit.
Return the maximum odd digit.
Function to return the product of n with its largest odd digit.
If there are no odd digits in n.
Product of n with its largest odd digit.
Driver code"
How can the above be solved in Python?

What is a code to product of N with its largest odd digit and the other steps required?
assistant
#Here is code to product of N with its largest odd digit and the other steps required.
 def largestOddDigit ( n ) :
	maxOdd = - 1
	while ( n > 0 ) :
		digit = n % 10
		if ( digit % 2 == 1 and digit > maxOdd ) :
			maxOdd = digit
		n = n // 10
	return maxOdd
def getProduct ( n ) :
	maxOdd = largestOddDigit ( n )
	if ( maxOdd == - 1 ) :
		return - 1
	return ( n * maxOdd )
if __name__ == " _ _ main _ _ " :
	n = 12345
	print ( getProduct ( n ) )