Quiz Complete, well Done!
Python also provides the 'is' and '
' operators for identity comparison.
What is the result of the expression 'True and True'?
What is the result of the expression 'True xor False' in Python?
In Python, the
operator returns True if both statements are true.
The
operator returns True if at least one statement is true in Python.
What is the result of the expression 'True and (False or True)'?
What is the result of the expression 'not True'?
AND
Which of the following is NOT a logical operator in Python?
The
operator is used to negate the operand.
What is the result of the expression 'False or True'?
Logical Operators
The
operator returns the opposite result in Python.
The
operator returns True if either of the operands is True.
The
operator returns True if both operands are True.
Which of the following is not a logical operator in Python?
Which logical operator has higher precedence in Python?
NOT
What is the result of the expression 'True or False'?
The order of evaluation for logical operators in Python is not,
, or.