Page 91 - Dig_CodeAI_V2.1_Class_7
P. 91
Example
Operator Name Description Output
(x=8 and y=6)
> Greater It checks whether the value of the left operand x > y True
than is greater than the value of the right operand.
If it is, the condition evaluates to true.
< Less than It checks whether the value of the left operand x < y False
is less than the value of the right operand. If it
is, the condition evaluates to true.
>= Greater It checks whether the value of the left operand x >= y True
than or is greater than or equal to the value of the right
equal to operand. If it is, the condition evaluates to true.
<= Less than It checks whether the value of the left operand x <= y False
or equal to is less than or equal to the value of the right
operand. If it is, the condition evaluates to true.
Program: To show all the relational operators’ functions.
On running the above program, you will get the following output:
More on Python 89

