Advertisement
andonyan

Bonus Scoring System

Feb 29th, 2020
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. import math
  2.  
  3. student_count = int(input())
  4. lecture_count = int(input())
  5. initial_bonus = int(input())
  6. max_bonus = 0
  7. max_lectures = 0
  8.  
  9. for i in range(student_count):
  10.     lectures_attended = int(input())
  11.     total_bonus = (lectures_attended / lecture_count) * (5 + initial_bonus)
  12.     if total_bonus >= max_bonus:
  13.         max_bonus = total_bonus
  14.         max_lectures = lectures_attended
  15. else:
  16.     print(f'Max Bonus: {math.ceil(max_bonus)}.')
  17.     print(f'The student has attended {max_lectures} lectures.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement