返回列表 發帖
  1. score = float(input("Input Score: "))
  2. if (90 <= score <= 100):
  3.     print("A++")
  4. elif (score >90<=80):
  5.     print("A+")
  6. elif (score >80<=70):
  7.     print("A")
  8. elif (score >70<=60):
  9.     print("B")
  10. elif (score <60>=0):
  11.     print("C")
  12. else:
  13.     print("Failed")
複製代碼

TOP

  1. score = float(input("Input Score: "))
  2. if (score < 0 or score > 100):
  3.     print("Failed")
  4. elif (score >= 90):
  5.     print("A++")
  6. elif (score >= 80):
  7.     print("A+")
  8. elif (score >= 70):
  9.     print("A")
  10. elif (score >= 60):
  11.     print("B")
  12. else:
  13.     print("C")
複製代碼

TOP

返回列表