human
Check if all objects of type A and B can be placed on N shelves | Function to return if allocation is possible or not.
Stores the shelves needed for items of type - A and type - B.
Find number of shelves needed for items of type - A.
Fill A / K shelves fully by the items of type - A.
Otherwise.
Fill A / L shelves fully and add remaining to an extra shelf.
Find number of shelves needed for items of type - B.
Fill B / L shelves fully by the items of type - B.
Fill B / L shelves fully and add remaining to an an extra shelf.
Total shelves needed.
If required shelves exceed N.
Driver Code"
How can the above be solved in Python?

What is a code to check if all objects of type A and B can be placed on N shelves and the other steps required?
assistant
#Here is code to check if all objects of type A and B can be placed on N shelves and the other steps required.
 def isPossible ( A , B , N , K , L ) :
	needa = 0
	needb = 0
	if ( A % K == 0 ) :
		needa = A // K ;
	else :
		needa = A // K + 1
	if ( B % L == 0 ) :
		needb = B // L
	else :
		needb = B // L + 1
	total = needa + needb
	if ( total > N ) :
		return False
	else :
		return True
if __name__ == ' _ _ main _ _ ' :
	A , B , N = 3 , 3 , 3
	K , M = 4 , 2
	if ( isPossible ( A , B , N , K , M ) ) :
		print ( ' YES ' )
	else :
		print ( ' NO ' )