human
Maximum number of objects that can be created as per given conditions | Function for finding the maximum number of objects from N type - 1 and M type - 2 items.
Storing minimum of N and M.
Storing maximum number of objects from given items.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to maximum number of objects that can be created as per given conditions and the other steps required.
 def numberOfObjects ( N , M ) :
	initial = min ( N , M )
	final = ( N + M ) // 3
	return min ( initial , final )
if __name__ == ' _ _ main _ _ ' :
	N = 8
	M = 7
	print ( numberOfObjects ( N , M ) )