human
Check if any large number is divisible by 17 or not | Function to check if the number is divisible by 17 or not.
Extracting the last digit.
Truncating the number.
Subtracting the five times the last digit from the remaining number.
Return n is divisible by 17.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to check if any large number is divisible by 17 or not and the other steps required.
 def isDivisible ( n ) :
	while ( n // 100 ) :
		d = n % 10
		n //= 10
		n -= d * 5
	return ( n % 17 == 0 )
if __name__ == " _ _ main _ _ " :
	n = 19877658
	if isDivisible ( n ) :
		print ( " Yes " )
	else :
		print ( " No " )