執行以下 Python 程式並輸入「65」,下列何者為程式的輸出? score = int(input()) if (score >= 90): print("A") elif (score >= 80): print("B") elif (score >= 60): print("C") else: print("F")
AA
BB
CC正確答案
DF
答案與詳解
65 >= 60 為 True,執行 print("C") 後整個 if-elif-else 結構結束,這就是正解。
Examly 收錄 38 萬+ 道歷屆題目,每題都有像這樣的精選詳解。免費下載,立即開練。
