human
Find the Nth element of the modified Fibonacci series | Function to return the Nth number of the modified Fibonacci series where A and B are the first two terms.
To store the current element which is the sum of previous two elements of the series.
This loop will terminate when the Nth element is found.
Return the Nth element.
Driver code"
How can the above be solved in Python?
 ... Give me a code to find the Nth element of the modified Fibonacci series and the other steps required?
assistant
#Here is code to find the Nth element of the modified Fibonacci series and the other steps required.
 def findNthNumber ( A , B , N ) :
	sum = 0
	for i in range ( 2 , N ) :
		sum = A + B
		A = B
		B = sum
	return sum
if __name__ == ' _ _ main _ _ ' :
	A = 5
	B = 7
	N = 10
	print ( findNthNumber ( A , B , N ) )