Python : Operators Expressions and Python Statements

<p>What will following code segment print?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">a=True<br>b=False<br>c=False<br>if not a or b:<br> print(1)<br>elif not a or not b and c:<br> print(2)<br>elif not a or b or not b and a:<br> print(3)<br>else:<br> print(4)</pre> , <p>What will following code segment print?</p><pre>a=True<br>b=False<br>c=False<br>if not a or b:<br><span style="white-space:pre"> </span>print(1)<br>elif not a or not b and c:<br><span style="white-space:pre"> </span>print(2)<br>elif not a or b or not b and a:<br><span style="white-space:pre"> </span>print(3)<br>else:<br><span style="white-space:pre"> </span>print(4)</pre>

<p>What will following code segment print?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">a=True<br>b=False<br>c=False<br>if not a or b:<br> print(1)<br>elif not a or not b and c:<br> print(2)<br>elif not a or b or not b and a:<br> print(3)<br>else:<br> print(4)</pre>

<p>What will following code segment print?</p><pre>a=True<br>b=False<br>c=False<br>if not a or b:<br><span style="white-space:pre"> </span>print(1)<br>elif not a or not b and c:<br><span style="white-space:pre"> </span>print(2)<br>elif not a or b or not b and a:<br><span style="white-space:pre"> </span>print(3)<br>else:<br><span style="white-space:pre"> </span>print(4)</pre>
A. 1

B. 3

C. 2

D. 4



Correct Answer :

B. 3



Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test , CCC MCQ Python Coding Tutorials Best Computer Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Website development Company in Allahabad