human
Maximum students to pass after giving bonus to everybody and not exceeding 100 marks | Function to return the number of students that can pass.
maximum marks.
maximum bonus marks that can be given.
counting the number of students that can pass.
Driver code"
How can the above be solved in Python?
 ... Write me a code to maximum students to pass after giving bonus to everybody and not exceeding 100 marks and the other steps required?
assistant
#Here is code to maximum students to pass after giving bonus to everybody and not exceeding 100 marks and the other steps required.
 def check ( n , marks ) :
	x = max ( marks )
	bonus = 100 - x
	c = 0
	for i in range ( n ) :
		if ( marks [ i ] + bonus >= 50 ) :
			c += 1
	return c
n = 5
marks = [ 0 , 21 , 83 , 45 , 64 ]
print ( check ( n , marks ) )