human
Count of contiguous subarrays possible for every index by including the element at that index | Function to find the number of subarrays including the element at every index of the array.
Creating an array of size N.
The loop is iterated till half the length of the array.
Condition to avoid overwriting the middle element for the array with even length ..
Computing the number of subarrays.
The ith element from the beginning and the ending have the same number of possible subarrays.
Function to print the vector.
Driver code"
Solution in Python:

Give me a code to count of contiguous subarrays possible for every index by including the element at that index and the other steps required?
assistant
#Here is code to count of contiguous subarrays possible for every index by including the element at that index and the other steps required.
 def calculateWays ( N ) :
	x = 0 ;
	v = [ ] ;
	for i in range ( N ) :
		v . append ( 0 ) ;
	for i in range ( N // 2 + 1 ) :
		if ( N % 2 == 0 and i == N // 2 ) :
			break ;
		x = N * ( i + 1 ) - ( i + 1 ) * i ;
		v [ i ] = x ;
		v [ N - i - 1 ] = x ;
	return v ;
def printArray ( v ) :
	for i in range ( len ( v ) ) :
		print ( v [ i ] , end = " ▁ " ) ;
if __name__ == " _ _ main _ _ " :
	v = calculateWays ( 4 ) ;
	printArray ( v ) ;