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