human
Check if the number is even or odd whose digits and base ( radix ) is given | Function that returns true if the number represented by arr [ ] is even in base r.
If the base is even , then the last digit is checked.
If base is odd , then the number of odd digits are checked.
To store the count of odd digits.
Number is odd.
Driver code"
How can the above be solved in Python?

=====
Write me a code to check if the number is even or odd whose digits and base ( radix ) is given and the other steps required?
assistant
#Here is code to check if the number is even or odd whose digits and base ( radix ) is given and the other steps required.
 def isEven ( arr , n , r ) :
	if ( r % 2 == 0 ) :
		if ( arr [ n - 1 ] % 2 == 0 ) :
			return True
	else :
		oddCount = 0
		for i in range ( n ) :
			if ( arr [ i ] % 2 != 0 ) :
				oddCount += 1
		if ( oddCount % 2 == 0 ) :
			return True
	return False
if __name__ == ' _ _ main _ _ ' :
	arr = [ 1 , 0 ]
	n = len ( arr )
	r = 2
	if ( isEven ( arr , n , r ) ) :
		print ( " Even " )
	else :
		print ( " Odd " )