human
Give me a code to find the Nth digit from right in base B of the given number in Decimal base and the other steps required given the following:
Find the Nth digit from right in base B of the given number in Decimal base | Function to compute Nth digit from right in base B.
Skip N - 1 Digits in Base B.
Nth Digit from right in Base B.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to find the Nth digit from right in base B of the given number in Decimal base and the other steps required.
 def nthDigit ( a , n , b ) :
	for i in range ( 1 , n ) :
		a = a // b
	return a % b
a = 100
n = 3
b = 4
print ( nthDigit ( a , n , b ) )