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