Examly題庫立即開始練習
身心障礙人員考試身障四等-資訊處理類科計算機概要11519單選題

若執行以下的 Python 程式碼,則螢幕上的輸出為: a = 2 b = 6 c = 4 d = 8 print(a>b or not c<=d, a!=d and b>c)

AFalse False
BFalse True正確答案
CTrue False
DTrue True
答案與詳解
B
正確答案
左式:False or not True = False;右式:True and True = True,故輸出 False True。

為什麼答案是 B

左式:a>b 為 False,c<=d 為 True,not True 為 False,False or False = False;右式:True and True = True。故為 False True。

考點:and 運算考點:邏輯運算綜合考點:not 優先序考點:運算全錯
載入中…

計算機概要 相關題目

想練更多計算機概要考古題?

Examly 收錄 38 萬+ 道歷屆題目,每題都有像這樣的精選詳解。免費下載,立即開練。

Download on theApp Store即將推出Google Play
黑皮