Python program for relational operators
A relational operator is a programming language construct or operator that tests or defines some kind of relation between two entities. in python, there are 6 relational operators
In python language, relational operators compare two numbers and return a boolean value.
there are six relational operators
The relational operators are < , > , <= , >= , == , and != . True if x is less than y, otherwise false.
INPUT-
#demonstrate the use of relational operators
print("KUNAL BHATI")
x=40
y=34
print(str(x) + "<" +str(y) +" = "+ str(x<y))
print(str(x) + ">" +str(y) +" = "+ str(x>y))
print(str(x) + "==" +str(y) +" = "+ str(x==y))
print(str(x) + "!=" +str(y) +" = "+ str(x!=y))
print(str(x) + "<=" +str(y) +" = "+ str(x<=y))
print(str(x) + ">=" +str(y) +" = "+ str(x>=y))
OUTPUT-
Project Files
| .. | ||
| This directory is empty. | ||