human
Can you provide a code to count rotations which are divisible by 10 and the other steps required given the following:
Count rotations which are divisible by 10 | Function to return the count of all rotations which are divisible by 10..
Loop to iterate through the number.
If the last digit is 0 , then increment the count.
Driver code"
Solution in Python:
assistant
#Here is code to count rotations which are divisible by 10 and the other steps required.
 def countRotation ( n ) :
	count = 0 ;
	while n > 0 :
		digit = n % 10
		if ( digit % 2 == 0 ) :
			count = count + 1
		n = int ( n / 10 )
	return count ;
if __name__ == " _ _ main _ _ " :
	n = 10203 ;
	print ( countRotation ( n ) ) ;