Teo_Yanchev

train_the_trainers_nested

Jul 14th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. n = int(input())
  2. name = input()
  3.  
  4. total_sum = 0
  5. count = 0
  6. while name != "Finish":
  7. count += 1
  8.  
  9. average_sum = 0
  10. for i in range(0, n):
  11. average_sum += float(input())
  12.  
  13. average_sum /= n
  14. total_sum += average_sum
  15. print(f"{name} - {average_sum:.2f}.")
  16.  
  17. name = input()
  18.  
  19. print(f"Student's final assessment is {total_sum / count:.2f}.")
Advertisement
Add Comment
Please, Sign In to add comment