human
Count of N digit palindromic numbers divisible by 9 | Function to find the count of N digits palindromic numbers which are divisible by 9.
If N is odd.
If N is even.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to count of N digit palindromic numbers divisible by 9 and the other steps required.
 def countPalindromic ( n ) :
	count = 0
	if ( n % 2 == 1 ) :
		count = pow ( 9 , ( n - 1 ) // 2 )
	else :
		count = pow ( 9 , ( n - 2 ) // 2 )
	return count
n = 3
print ( countPalindromic ( n ) )