返回列表 發帖
  1. score = eval(input("enter your score: "))
  2. if score >= 90 and score <= 100:
  3.     print("a")
  4. elif score >= 80 and score < 90:
  5.     print("b")
  6. elif score >= 70 and score < 80:
  7.     print("c")
  8. elif score >= 60 and score < 70:
  9.     print("d")
  10. elif score < 60 and score >= 0:
  11.     print("did not pass")
  12. else:
  13.     print("invalid")
複製代碼

TOP

  1. score = eval(input("enter your score: "))
  2. if score >= 90:
  3.     print("a")
  4. elif score >= 80:
  5.     print("b")
  6. elif score >= 70:
  7.     print("c")
  8. elif score < 60:
  9.     print("did not pass")
  10. elif score > 100:
  11.     print("invalid")
  12. elif score < 0:
  13.     print("invalid")
複製代碼

TOP

返回列表