human
What is a code to find the count of even odd pairs in a given Array and the other steps required given the following:
Find the count of even odd pairs in a given Array | Function to count the pairs in array of the form ( even , odd ).
Check if number is even or not.
Driver code"
Solution in Python:
assistant
#Here is code to find the count of even odd pairs in a given Array and the other steps required.
 def findCount ( arr , n ) :
	count = 0
	ans = 0
	for i in range ( 0 , n ) :
		if ( arr [ i ] % 2 == 0 ) :
			count = count + 1
		else :
			ans = ans + count
	return ans
a = [ 5 , 4 , 1 , 2 , 3 ]
n = len ( a )
print ( findCount ( a , n ) )