Title: Truth Tables: "or" Operator
Course: CPS 120: Introduction to Computer Science ~ Master (Aug/2015) OLD > Section: Learning Units

"or" Operator

- The simple conditions on each side of the “or” must be False for the compound condition to be False.
- Otherwise the compound condition is True.

“or” operator truth table
Left-side simple condition | Right-side simple condition | Result
True | True | True
True | False | True
False | True | True
False | False | False

Compound condition examples using “or”:

(22 != 33) or (10 < 10)
(option == 1) or (option == 2)
(True) or (False)
("X" < "Y") or ("X" == "x")