human
Find the Nth term of the series 14 , 28 , 20 , 40 , ... . . | Function to find the N - th term.
initializing the 1 st number.
loop from 2 nd term to nth term.
if i is even , double the previous number.
if i is odd , subtract 8 from previous number.
Driver Code"
How can the above be solved in Python?
 Can you provide a code to find the Nth term of the series 14 , 28 , 20 , 40 ,?
assistant
#Here is code to find the Nth term of the series 14 , 28 , 20 , 40 , .
 def findNth ( N ) :
	b = 14
	for i in range ( 2 , N + 1 ) :
		if ( i % 2 == 0 ) :
			b = b * 2
		else :
			b = b - 8
	return b
N = 6
print ( findNth ( N ) )