Logical Operators
Logical operators are used to combine tests. Instead of embedded or multiple statements, one if statement could handle it all .
For most languages except Python:
Operator | Example(s) | |
and (all tests are true) |
|
|
or (at least one test is true) |
|
|
not (runs if the variable is false) |
|
|
Python:
These examples have not been tested.
Operator | Example(s) | |
and (all tests are true) |
|
|
or (at least one test is true) |
|
|
not (runs if the variable is false) |
|
|
Last updated