返回列表 發帖
  1. englishscore=int(input("請輸入英文成績:"))
  2. chinesescore=int(input("請輸入國文成績:"))
  3. mathscore=int(input("請輸入數學成績:"))
  4. totalscore=englishscore+chinesescore+mathscore
  5. print("總分:",totalscore)
  6. totalscore=totalscore/3
  7. print("平均分數為%.2f"%totalscore)
  8. if totalscore>=60:
  9.     print("及格!!")
  10. else:
  11.     print("不及格!!")
複製代碼

TOP

返回列表