human
What is a code to pell Number and the other steps required given the following:
Pell Number | calculate nth pell number.
driver function"
How can the above be solved in Python?
assistant
#Here is code to pell Number and the other steps required.
 def pell ( n ) :
	if ( n <= 2 ) :
		return n
	a = 1
	b = 2
	for i in range ( 3 , n + 1 ) :
		c = 2 * b + a
		a = b
		b = c
	return b
n = 4
print ( pell ( n ) )