For this Question: Given an array A of integers, find the number of subarrays with an odd sum.First line contains an integers N.
Next line contains N space separated integers denoting elements of array.

Constraints
1 <= N <= 10^5
1 <= Ai <= 10^5Print the number of subarrays with an odd sum.Sample Input 1:
3
1 3 5

Output 
4

Explanation: 
All subarrays are [1], [1, 3], [1, 3, 5], [3], [3, 5], [5]
All sub- arrays sum are [1, 4, 9, 3, 8, 5].
Odd sums are [1, 9, 3, 5] so the answer is 4.

Sample Input 2:
3
2 4 6

Output 
0

Explanation: 
All subarrays are [2], [2, 4], [2, 4, 6], [4], [4, 6], [6]
All sub- arrays sum are [2, 6, 12, 4, 10, 6].
All sub- arrays have even sum and the answer is 0., I have written this Solution Code: 

def countOddSum(a, n):

	# 'odd' stores number of
	# odd numbers upto ith index
	# 'c_odd' stores number of
	# odd sum subarrays starting
	# at ith index
	# 'Result' stores the number
	# of odd sum subarrays
	c_odd = 0;
	result = 0;
	odd = False;

	# First find number of odd
	# sum subarrays starting at
	# 0th index
	for i in range(n):
		if (a[i] % 2 == 1):
			if(odd == True):
				odd = False;
			else:
				odd = True;

		if (odd):
			c_odd += 1;

	# Find number of odd sum
	# subarrays starting at ith
	# index add to result
	for i in range(n):
		result += c_odd;
		if (a[i] % 2 == 1):
			c_odd = (n - i - c_odd);

	return result;

n=int(input())
arr=list(map(int,input().strip().split()))[:n]
print(countOddSum(arr,n)), In this Programming Language: Python, Now tell me if this Code is compilable or not?