human
Check if a number is divisible by 31 or not | Function to check if the number is divisible by 31 or not.
While there are at least two digits.
Extracting the last.
Truncating the number.
Subtracting three times the last digit to the remaining number.
Finally return if the two - digit number is divisible by 31 or not.
Driver Code"
Solution in Python:

Write me a code to check if a number is divisible by 31 or not and the other steps required?
assistant
#Here is code to check if a number is divisible by 31 or not and the other steps required.
 def isDivisible ( n ) :
	while n // 100 :
		d = n % 10
		n //= 10
		n = abs ( n - ( d * 3 ) )
	return ( n % 31 == 0 )
if __name__ == " _ _ main _ _ " :
	n = 1922
	if ( isDivisible ( n ) ) :
		print ( " Yes " )
	else :
		print ( " No " )