100 Câu hỏi trắc nghiệm lập trình Python có đáp án - Phần 1

Kết quả nào là output của đoạn code dưới đây? x = True y = False z = False if not x or y: print(1) elif not x or not y and z: print(2) elif not x or y or not y and x: print(3) else : print(4)

49/50

Kết quả nào là output của đoạn code dưới đây?
x = True
y = False
z = False
if not x or y:
print(1)
elif not x or not y and z:
print(2)
elif not x or y or not y and x:
print(3)
else :
print(4)

2

None

1

3

Giải thích

D là đáp án đúng