human
Write me a code to count pairs with Bitwise XOR as ODD number and the other steps required given the following:
Count pairs with Bitwise XOR as ODD number | Function to count number of odd pairs.
find all pairs.
return number of odd pair.
Driver Code.
calling function findOddPair and print number of odd pair"
How can the above be solved in Python?
assistant
#Here is code to count pairs with Bitwise XOR as ODD number and the other steps required.
 def findOddPair ( A , N ) :
	count = 0
	for i in range ( 0 , N ) :
		if ( A [ i ] % 2 == 0 ) :
			count += 1
	return count * ( N - count )
if __name__ == ' _ _ main _ _ ' :
	a = [ 5 , 4 , 7 , 2 , 1 ]
	n = len ( a )
	print ( findOddPair ( a , n ) )