I have a problem with this code, this program should keep allowing you enter students until the number of passes reaches 8 or the total number of students reaches 10. However currently it just keeps asking for input and hence there is an infinite loop. How do I go about fixing this?
total_students=0
student_passes=0
student_failures=0
while (total_students <= 10) or (student_passes != 8):
result=int(input("Input the exam result: "))
if result>=50:
student_passes = student_passes + 1
else:
student_failures = student_failures + 1
total_students = total_students + 1
print (student_passes)
print (student_failures)
if student_passes >= 8:
print ("Well done")