By Kunal bhati
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-
Submitted by Kunal bhati (Kunalbhati12)
Download packets of source code on Coders Packet
Comments