Advertisement
desislava_topuzakova

04. Train The Trainers

Oct 16th, 2022
421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. count_jury = int(input()) # бр. журито = бр. оценки за всяка презентация
  2. # повтаряме: въвеждаме презентации
  3. # стоп: входни данни == "Finish"
  4. # продължаваме: входни данни != "Finish"
  5.  
  6. sum_all_grades = 0 # сума от оценките за всички презентации
  7. count_all_grades = 0 # брой на всички оценки за всички презентации
  8.  
  9. presentation = input() # име на презентация или "Finish"
  10. while presentation != "Finish":
  11. # presentation -> име на презентация
  12. # 1. получа оценки от журито
  13. sum_grades_per_presentation = 0 # сума от оценките на журито за презентацията
  14. for jury in range(1, count_jury + 1):
  15. grade = float(input())
  16. count_all_grades += 1
  17. sum_grades_per_presentation += grade
  18. sum_all_grades += grade
  19. # 2. print
  20. average_grade_per_presentation = sum_grades_per_presentation / count_jury
  21. print(f"{presentation} - {average_grade_per_presentation:.2f}.")
  22.  
  23. presentation = input()
  24.  
  25. average_grade_all_presentations = sum_all_grades / count_all_grades
  26. print(f"Student's final assessment is {average_grade_all_presentations:.2f}.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement