human
Count numbers in range 1 to N which are divisible by X but not by Y | Function to count total numbers divisible by x but not y in range 1 to N.
Check if Number is divisible by x but not Y if yes , Increment count.
Driver Code"
Solution in Python:

=====
What is a code to count numbers in range 1 to N which are divisible by X but not by Y and the other steps required?
assistant
#Here is code to count numbers in range 1 to N which are divisible by X but not by Y and the other steps required.
 def countNumbers ( X , Y , N ) :
	count = 0 ;
	for i in range ( 1 , N + 1 ) :
		if ( ( i % X == 0 ) and ( i % Y != 0 ) ) :
			count += 1 ;
	return count ;
X = 2 ;
Y = 3 ;
N = 10 ;
print ( countNumbers ( X , Y , N ) ) ;