human
Check if N can be represented as sum of positive integers containing digit D at least once | Function to check if N contains digit D in it.
Iterate until N is positive.
Find the last digit.
If the last digit is the same as digit D.
Return false.
Function to check if the value of N can be represented as sum of integers having digit d in it.
Iterate until N is positive.
Check if N contains digit D or not.
Subtracting D from N.
Return false.
Driver Code"
How can the above be solved in Python?

=====
Write me a code to check if N can be represented as sum of positive integers containing digit D at least once and the other steps required?
assistant
#Here is code to check if N can be represented as sum of positive integers containing digit D at least once and the other steps required.
 def findDigit ( N , D ) :
	while ( N > 0 ) :
		a = N % 10
		if ( a == D ) :
			return True
		N /= 10
	return False
def check ( N , D ) :
	while ( N > 0 ) :
		if ( findDigit ( N , D ) == True ) :
			return True
		N -= D
	return False
if __name__ == ' _ _ main _ _ ' :
	N = 24
	D = 7
	if ( check ( N , D ) ) :
		print ( " Yes " )
	else :
		print ( " No " )