返回列表 發帖
  1. a=int(input("請輸入國文成績: "));
  2. b=int(input("請輸入數學成績: "));
  3. c=int(input("請輸入英文成績: "));
  4. d=a+b+c
  5. f=a+b+c/3
  6. print("\n總分:%d 平均:%.2f"%(d,f))
  7. if d<=60:
  8.      print("不及格,斬")
  9. elif d<0:
  10.      print("錯誤")
  11. elif d>100:
  12.      print("錯誤")
  13. else:
  14.      print("及格!")
複製代碼

TOP

返回列表