SHARE
TWEET

Untitled

a guest Feb 14th, 2020 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. name = input()
  2. counter = 1
  3. secondCounter = 0
  4. grades = 0.0
  5. while counter <= 12:
  6.     grade = float(input())
  7.     if grade >= 4.00:
  8.         grades += grade
  9.         counter += 1
  10.     else:
  11.         secondCounter += 1
  12.         if secondCounter == 2:
  13.             print(name, f"has been excluded at {counter} grade")
  14.             break
  15. averageGrade = grades / 12
  16. if averageGrade >= 4.00:
  17.     print(name, f"graduated. Average grade: {averageGrade:.2f}")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top