Appearance
Operator
Operators in selection refer to the logical or comparison symbols used to create conditions upon which decisions are based in programming. These operators allow the program to evaluate expressions and make choices.
Comparison Operator
- These operators compare values and return a boolean result (true or false).
Operators
- Equal to (==)
- Not equal to (!=)
- Greater than (>)
- Less than (<)
- Greater than or equal to (>=)
- Less than or equal to (<=)
Logical Operators
- These operators combine multiple conditions and produce a boolean result.
Operators
- AND (and): Returns true if both conditions are true.
- OR (or): Returns true if at least one condition is true.
- NOT (not): Reverses the logical state of its operand.