Chapter Four Flashcards
Boolean expression
Is one that represents only one of two states usually expressed as true or false
If-then Decision Structure
Contains a tested Boolean expression and an action that is taken only when the expression is true.
If-then clause
Of a Decision holds the statements that execute when the tested Boolean expression is true.
Else clause
Of a Decision holds the statements that execute only when tested Boolean expression is false.
Relational comparison operators
Are the symbols that express Boolean comparisons. Examples include =, >, =, <=, and <>.
Trivial expression
Is one that always evaluates to the same value.
Compound condition
Is constructed when you need to ask multiple questions before determining an outcome
AND decsion
Contains two or more decisions all conditions must be true for an action to take place.
Nested Decision or a nested If
Is a decision within either the if-then or else clause of another decision.
Cascading if Statement
Is a series of nested if statements.
Conditional and operator (or more simply and AND operator)
Is a symbol that you use to combine conditions when they all must be true for an action to occur.
Truth tables
Are diagrams used in mathematics and logic to help describe the truth of an entire expression based on the truth of its parts.
Short circuit evaluation
Is a logical feature in which expressions in each part of a larger expression are evaluated only as far as necessary to determine the final outcome.
OR Decision
Contains two or more decisions if at least one condition is met the resulting action takes place
Conditional OR operator (or more simply an OR operator)
Is a symbol that you can use to combine conditions when at least one of them must be true for an action to occur.