Advertisement
eNeRGy90

Untitled

Nov 10th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. name = input()
  2. result = 0
  3. year = 1
  4.  
  5. while year <= 12:
  6.     grade = float(input())
  7.     if grade >= 4:
  8.         year += 1
  9.         result += grade
  10.  
  11. print(f"{name} graduated. Average grade: {result/12:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement