Computer Science, asked by sahilraj3056, 11 months ago

Write down the purpose of relational and logical operators in Python Programming language​

Answers

Answered by tumatimahitha152
0

Answer:

Relational operators are used to establish some sort of relationship between the two operands. Some of the relevant examples could be less than, greater than or equal to operators. Python language is capable of understanding these types of operators and accordingly return the output, which can be either True or False.

Logical operators, as the name suggests are used in logical expressions where the operands are either True or False. The operands in a logical expression, can be expressions which returns True or False upon evaluation. There are three basic types of logical operators:

Logical AND: For AND operation the result is True if and only if both operands are True. The keyword used for this operator is and.

Logical OR: For OR operation the result is True if either of the operands is True. The keyword used for this operator is or.

Logical NOT: The result is True if the operand is False. The keyword used for this operator is not.

Explanation:

Similar questions