返回列表 發帖
本帖最後由 簡宗漢 於 2022-8-19 10:45 編輯
  1. english=int(input("請輸入你的英語成績"))
  2. chinese=int(input("請輸入你的國語成績"))
  3. math=int(input("請輸入你的數學成績"))

  4. score=english+chinese+math
  5. score2=score/3

  6. score3=print("\n總分:%d 平均:%.0f"%(score,score2))
  7. if score>=180 and score2>=60:
  8.     print("恭喜你及格!")
  9. else:
  10.     print("恭喜你不及格!")
複製代碼

TOP

返回列表