desislava_topuzakova

04. Train The Trainers

Apr 11th, 2021
483
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. count_jury = int(input())
  2.  
  3. presentation = input()
  4. # stop: presentation == "Finish"
  5. # continue: presentation != "Finish"
  6. sum_all_grades = 0
  7. count_all_grades = 0
  8. while presentation != "Finish":
  9.     # за всяка презентация:
  10.         #  четем по една оценка от всеки от журито
  11.         # средна оценка = сума от всички оценки / броя на оценки (броя на журито)
  12.     sum_grades = 0 # сума от оценките за текущата презентация
  13.     for jury in range(1, count_jury + 1):
  14.         grade = float(input())
  15.         count_all_grades += 1 # броя на всички оценки
  16.         sum_grades += grade # сума от оценките за текущата презентация
  17.         sum_all_grades += grade # сума от оценките за всички презентации
  18.     # знам сумата от оценките
  19.     average_grade = sum_grades / count_jury
  20.     print(f"{presentation} - {average_grade:.2f}.")
  21.  
  22.     presentation = input()
  23. else:
  24.     average_all = sum_all_grades / count_all_grades
  25.     print(f"Student's final assessment is {average_all:.2f}.")
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×