human
What is a code to find the Number which contain the digit d and the other steps required given the following:
Find the Number which contain the digit d | Python 3 program to print the number which contain the digit d from 0 to n.
function to display the values.
Converting d to character.
Loop to check each digit one by one ..
initialize the string.
checking for digit.
Driver code"
Solution in Python:
assistant
#Here is code to find the Number which contain the digit d and the other steps required.
 def index ( st , ch ) :
	for i in range ( len ( st ) ) :
		if ( st [ i ] == ch ) :
			return i ;
	return - 1
def printNumbers ( n , d ) :
	st = " " + str ( d )
	ch = st [ 0 ]
	for i in range ( 0 , n + 1 , 1 ) :
		st = " "
		st = st + str ( i )
		if ( i == d or index ( st , ch ) >= 0 ) :
			print ( i , end = " ▁ " )
if __name__ == ' _ _ main _ _ ' :
	n = 100
	d = 5
	printNumbers ( n , d )