返回列表 發帖
本帖最後由 張育維 於 2023-7-10 15:51 編輯
  1. k=input("Please enter Chinese score: ")
  2. l=input("Please enter Math score: ")
  3. m=input("Please enter English score: ")
  4. print("Total= "+str(int(k)+int(l)+int(m)))
  5. n=(int(k)+int(l)+int(m))/3
  6. o="Average= %.2f"%n
  7. print(o)
  8. if float(o) or int(o)>=60:
  9.     print("You passed!")
  10. else:
  11.     print("You didn't pass!")
複製代碼

TOP

返回列表