human
What is a code to maximum students to pass after giving bonus to everybody and not exceeding 100 marks and the other steps required given the following:
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"
Solution in Python:
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 ) )