Chapter 4: Making Decisions
1. Every decision you make in a computer program involves evaluating a Boolean expression. ANS: T PTS: 1 REF: 122
2. In any Boolean expression, the two values compared can be either variables or constants. ANS: T PTS: 1 REF: 126
3. Any decision can be made using combinations of just two types of comparisons: equal and not equal. ANS: F PTS: 1 REF: 127
4. Most programming languages allow you to ask two or more questions in a single comparison. ANS: T PTS: 1 REF: 134
5. A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to
determine whether the entire expression is true or false. ANS: T PTS: 1 REF: 135
6. When you need to satisfy two or more criteria to initiate an event in a program, you must make sure
that the second decision is made entirely independently of the first decision. ANS: F PTS: 1 REF: 136
7. Besides AND and OR operators, most languages support a NOT operator. ANS: T PTS: 1 REF: 147
8. Most programming languages limit the number of AND and OR operators in an expression. ANS: F PTS: 1 REF: 154
9. When you combine AND and OR operators, the OR operators take precedence, meaning their Boolean
values are evaluated first. ANS: F PTS: 1 REF: 154
10. You can use parentheses to override the default order of operations. ANS: T PTS: 1 REF: 156
1. A selection with an action that is associated with each of two possible outcomes is known as a(n) ____
ANS: B PTS: 1 REF: 122
2. The keyword that is NOT included in a single-alternative selection is ____.
3. Boolean expressions are named after ____.
4. ____ operators require two operands.
5. The ____ sign means “greater than.”
ANS: D PTS: 1 REF: 126
6. Usually, ____ variables are not considered to be equal unless they are identical.
7. When you ask multiple questions before an outcome is determined, you create a ____ condition.
8. A(n) ____ decision is a decision in which two conditions must be true for an action to take place.