Title: Logical Operators
Course: CPS 120: Introduction to Computer Science ~ Master (Aug/2015) OLD > Section: Learning Units

- Combine two simple conditions into a compound condition, or reverse the value of a simple condition.
- Each simple condition is TRUE or FALSE, and after applying the logical operator, the compound condition is TRUE or FALSE.
- There are three logical operators: and, or, not.

Logical Operator | Description
&& | If both simple conditions are True, compound condition is True
|| | If either simple condition is True, compound condition is True
! | True if simple condition is False False if simple condition is True