Skip to main content

#Relation(Comparison) Operator

 #Relation(Comparison) Operator


a = 21

b = 10


#Equal To

print  "a==b is",a==b;  #(a=21 == b=10) is False; Therefore a is not equal to b.

              #the two given values are equal to each other then result will be True, Otherwise it returns False.

#Not Equal to 

print  "a!=b is",a!=b;


#Grater Than

print  "a>b is",a>b; #(a=21 > b=10) is True; Therefore a is grater than b.

                                 #the first value is grater than the second value then result will be True, Otherwise it returns False.


#Less Than

print  "a<b is",a<b; #(a=21 < b=10) is False; Therefore a is not less than b.

                               #the first value is less than the second value then result will be True, Otherwise it returns False.


#Grater Than or Equal To

print  "a>=b is",a>=b; #(a=21 >= b=10) is True; Therefore a is grater than or equal to b.

                                           #the first value is grater than or equal to the second value then result will be True, Otherwise it returns False.


#Less Than or Equal To

print  "a<=b is",a<=b; #(a=21 <= b=10) is False; Therefore a is not less than or equal to  b.

                                         #the first value is less than or equal to  the second value then result will be True, Otherwise it returns False.


#Excute


#OUTPUT

# a==b is False

# a!=b is True

# a>b is True

# a<b is False

# a>=b is True

# a<=b is False





                                         #ThE ProFessoR