返回列表 發帖
本帖最後由 張晏齊 於 2022-7-19 11:00 編輯
  1. # -*- coding: utf-8 -*-
  2. """
  3. Spyder Editor

  4. This is a temporary script file.
  5. """
  6. score=eval(input("請輸入你的成績: "))
  7. if score>=90 and score <=100:
  8.     print("優等!")
  9. elif score>=80 and score<89:
  10.     print("甲等" )
  11. elif score>=70 and score<79:         
  12.     print("乙等" )     
  13. elif score>=60 and score<69:
  14.     print("可憐哪")
  15. elif score>=0 and score<59:
  16.     print("不及格!")
  17. else:
  18.     print("輸入錯誤!")
複製代碼

TOP

返回列表