Advertisement
BbJLeB

07. Train The Trainers

Jun 5th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. # 07. Train The Trainers
  2.  
  3. numberOfPeople = int(input())
  4. allScore = 0
  5. counter = 0
  6. while True:
  7.     nameOfPresentation = input()
  8.     sumOfGrades = 0
  9.     if nameOfPresentation == "Finish":
  10.         scoreSum = allScore / counter
  11.         print(f"Student's final assessment is {scoreSum:.2f}.")
  12.         break
  13.     i = 0
  14.     while i < numberOfPeople:
  15.         grade = float(input())
  16.         sumOfGrades += grade
  17.         allScore += grade
  18.         counter += 1
  19.         i += 1
  20.     sumAfter = sumOfGrades / numberOfPeople
  21.     print(f"{nameOfPresentation} - {sumAfter:.2f}.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement