For each subject, show the attendance % and exactly how many more lectures a student must attend to reach 75%.
Skills: C / Python, arrays, arithmetic, loops
A common worry for every college student before exams
Students often realise too late that their attendance is below 75% in some subjects. A simple tool can warn them early and tell them how many lectures they must not miss.
For every subject you know the lectures held so far and the lectures attended. If a student attends every coming lecture, how many more do they need to reach 75%?
Example: held 40, attended 26 → 65%. Attending x more gives (26 + x) / (40 + x) ≥ 0.75 → x = 16.
Create a free student account to submit your work, get mentor feedback and unlock the reference solution.