human
What is a code to check if the number formed by the last digits of N numbers is divisible by 10 or not and the other steps required given the following:
Check if the number formed by the last digits of N numbers is divisible by 10 or not | Function that returns true if the number formed by the last digits of all the elements is divisible by 10.
Last digit of the last element.
Number formed will be divisible by 10.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to check if the number formed by the last digits of N numbers is divisible by 10 or not and the other steps required.
 def isDivisible ( arr , n ) :
	lastDigit = arr [ n - 1 ] % 10 ;
	if ( lastDigit == 0 ) :
		return True ;
	return False ;
if __name__ == " _ _ main _ _ " :
	arr = [ 12 , 65 , 46 , 37 , 99 ] ;
	n = len ( arr ) ;
	if ( isDivisible ( arr , n ) ) :
		print ( " Yes " ) ;
	else :
		print ( " No " ) ;