human
Count subarrays having even Bitwise XOR | Function to count the number of subarrays having even Bitwise XOR.
Store the required result.
Generate subarrays with arr [ i ] as the first element.
Store XOR of current subarray.
Generate subarrays with arr [ j ] as the last element.
Calculate Bitwise XOR of the current subarray.
If XOR is even , increase ans by 1.
Prthe result.
Driver Code.
Given array.
Stores the size of the array.
Function Call"
Solution in Python:

=====
Write me a code to count subarrays having even Bitwise XOR and the other steps required?
assistant
#Here is code to count subarrays having even Bitwise XOR and the other steps required.
 def evenXorSubarray ( arr , n ) :
	ans = 0
	for i in range ( n ) :
		XOR = 0
		for j in range ( i , n ) :
			XOR = XOR ^ arr [ j ]
			if ( ( XOR & 1 ) == 0 ) :
				ans += 1
	print ( ans )
if __name__ == ' _ _ main _ _ ' :
	arr = [ 1 , 2 , 3 , 4 ]
	N = len ( arr )
	evenXorSubarray ( arr , N )