human
Count ways to reach Nth Stairs by taking 1 and 2 steps with exactly one 3 step | Function to find the number the number of ways to reach Nth stair.
Array including number of ways that includes 3.
Array including number of ways that doesn 't includes 3.
Initially to reach 3 stairs by taking 3 steps can be reached by 1 way.
Loop to find the number the number of ways to reach Nth stair.
Driver Code"
Solution in Python:

Give me a code to count ways to reach Nth Stairs by taking 1 and 2 steps with exactly one 3 step and the other steps required?
assistant
#Here is code to count ways to reach Nth Stairs by taking 1 and 2 steps with exactly one 3 step and the other steps required.
 def number_of_ways ( n ) :
	includes_3 = [ 0 ] * ( n + 1 )
	not_includes_3 = [ 0 ] * ( n + 1 )
	includes_3 [ 3 ] = 1
	not_includes_3 [ 1 ] = 1
	not_includes_3 [ 2 ] = 2
	not_includes_3 [ 3 ] = 3
	for i in range ( 4 , n + 1 ) :
		includes_3 [ i ] = includes_3 [ i - 1 ] + includes_3 [ i - 2 ] + not_includes_3 [ i - 3 ]
		not_includes_3 [ i ] = not_includes_3 [ i - 1 ] + not_includes_3 [ i - 2 ]
	return includes_3 [ n ]
n = 7
print ( number_of_ways ( n ) )