Page 122 - ConceptGP_C8_Fb
P. 122
!= Not equal It checks if the values of two operands are x != y TRUE
equal or not. If the values are not equal,
then the condition becomes true.
> Greater It checks if the value of left operand is x > y TRUE
than greater than the value of right operand. If
yes, then the condition becomes true.
< Less than It checks if the value of left operand is less x < y FALSE
than the value of right operand. If yes, then
the condition becomes true.
>= Greater It checks if the value of left operand is x >= y TRUE
than or greater than or equal to the value of
equal to right operand. If yes, then the condition
becomes true.
<= Less than It checks if the value of left operand is less x <= y FALSE
or equal to than or equal to the value of right operand.
If yes, then the condition becomes true.
Program 4: To show all the relational operators’ functions.
The result of the above program is:
Precedence of Operators
Precedence of operators determines the order in which the operators are executed. The
operator precedence in Python is listed in the following table. The highest precedence is at
the top.
120 Premium Edition-VIII

