human
Write me a code to find the number of spectators standing in the stadium at time t and the other steps required given the following:
Find the number of spectators standing in the stadium at time t | Python program to find number of spectators standing at a time.
If the time is less than k then we can print directly t time ..
If the time is n then k spectators are standing ..
Otherwise we calculate the spectators standing ..
Stores the value of n , k and t t is time n & k is the number of specators"
How can the above be solved in Python?
assistant
#Here is code to find the number of spectators standing in the stadium at time t and the other steps required.
 def result ( n , k , t ) :
	if ( t <= k ) :
		print ( t )
	elif ( t <= n ) :
		print ( k )
	else :
		temp = t - n
		temp = k - temp
		print ( temp )
n = 10
k = 5
t = 12
result ( n , k , t )