human
Count of numbers from range [ L , R ] that end with any of the given digits | Function to return the count of the required numbers.
Last digit of the current number.
If the last digit is equal to any of the given digits.
Driver code"
Solution in Python:
 What is a code to count of numbers from range [ L , R ] that end with any of the given digits and the other steps required?
assistant
#Here is code to count of numbers from range [ L , R ] that end with any of the given digits and the other steps required.
 def countNums ( l , r ) :
	cnt = 0 ;
	for i in range ( l , r + 1 ) :
		lastDigit = ( i % 10 ) ;
		if ( ( lastDigit % 10 ) == 2 or ( lastDigit % 10 ) == 3 or ( lastDigit % 10 ) == 9 ) :
			cnt += 1 ;
	return cnt ;
if __name__ == " _ _ main _ _ " :
	l = 11 ; r = 33 ;
	print ( countNums ( l , r ) ) ;