And
Jump to navigation
Jump to search
and
is a keyword for logical binary operator of conjunction (and) of boolean algebra. It evaluates two operands and returns true
only when both operands are true
, else it returns false
.
Examples
print false and false // output : 0
print false and true // output : 0
print true and false // output : 0
print true and true // output : 1
a = true
b = false
c = true
print a and b // output : 0
print b and c // output : 0
print a and c // output : 1
minimum = 3
maximum = 7
A = 4
B = 9
print A > minimum and A < maximum // output : 1
print B > minimum and B < maximum // output : 0