Logical Operators

Code and Output

#Logical for AND
x , y = 10, 30
if ( x == 10 and y == 20):
print ("Yes")
else:
print ("No")

#Logical for OR
a , b = 2 , 5
if ( a == 1 or b == 5):
print ("True")
else:
print ("False")

#Logical for NOT
z = 10
if not (z == 9):
print ("Hello")
else:
print ("Bye")


Comments

Popular posts from this blog

WAN Technology

LO3 - Know the features and functions of information systems

WDD - LO1 - MANAGE SECURE SITES