human
Minimum cost to reach the top of the floor by climbing stairs | function to find the minimum cost to reach N - th floor.
traverse till N - th stair.
update the last two stairs value.
Driver Code"
How can the above be solved in Python?

=====
Give me a code to minimum cost to reach the top of the floor by climbing stairs and the other steps required?
assistant
#Here is code to minimum cost to reach the top of the floor by climbing stairs and the other steps required.
 def minimumCost ( cost , n ) :
	dp1 = 0
	dp2 = 0
	for i in range ( n ) :
		dp0 = cost [ i ] + min ( dp1 , dp2 )
		dp2 = dp1
		dp1 = dp0
	return min ( dp1 , dp2 )
if __name__ == " _ _ main _ _ " :
	a = [ 2 , 5 , 3 , 1 , 7 , 3 , 4 ]
	n = len ( a )
	print ( minimumCost ( a , n ) )