human
Smallest odd digits number not less than N | function to check if all digits are odd of a given number.
iterate for all digits.
if digit is even.
all digits are odd.
function to return the smallest number with all digits odd.
iterate till we find a number with all digits odd.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to smallest odd digits number not less than N and the other steps required.
 def check_digits ( n ) :
	while ( n ) :
		if ( ( n % 10 ) % 2 == 0 ) :
			return 0
		n = int ( n / 10 )
	return 1
def smallest_number ( n ) :
	i = n
	while ( 1 ) :
		if ( check_digits ( i ) ) :
			return i
		i += 1
if __name__ == ' _ _ main _ _ ' :
	N = 2397
	print ( smallest_number ( N ) )