TRUE/FALSE
1. Every decision you make in a computer program involves evaluating a Boolean expression.
ANS: T PTS: 1 REF: 134
2. 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: 148
3. Most programming languages allow you to ask two or more questions in a single comparison.
ANS: T PTS: 1 REF: 153
4. When you combine AND and OR operators, the OR operators take precedence, meaning their
Boolean values are evaluated first.
ANS: F PTS: 1 REF: 166
5. You can use parentheses to override the default order of operations.
ANS: T PTS: 1 REF: 167
MULTIPLE CHOICE
1. A selection with an action that is associated with each of two possible outcomes is known as a(n)
____ selection.
a. unary c. octal
b. binary d. semiconductor
ANS: B PTS: 1 REF: 134
2. The keyword that is NOT included in a single-alternative selection is ____.
a. if c. else
b. then d. endif
ANS: C PTS: 1 REF: 134
3. Boolean expressions are named after ____.
a. Harold Boolean c. George Boole
b. Henry Boole d. Gerhardt Boolean
ANS: C PTS: 1 REF: 134
4. ____ operators require two operands.
a. Unary c. Binary
b. Tertiary d. Double
ANS: C PTS: 1 REF: 137
5. In most programming languages, the ____ sign means “greater than.”
, a. < c. <=
b. = d. >
ANS: D PTS: 1 REF: 138
6. Usually, ____ variables are not considered to be equal unless they are identical.
a. string c. character
b. integers d. floating point
ANS: A PTS: 1 REF: 139
7. When you ask multiple questions before an outcome is determined, you create a ____ condition.
a. dual-alternative c. single-alternative
b. nested d. compound
ANS: D PTS: 1 REF: 141
8. A(n) ____ decision is a decision in which two conditions must be true for an action to take place.
a. OR c. AND
b. XOR d. OR-ELSE
ANS: C PTS: 1 REF: 142
9. A series of nested if statements is also called a ____ statement.
a. n-alternative if c. case
b. cascading if d. loop
ANS: B PTS: 1 REF: 143
10. A series of nested if statements is also called a ____ if statement.
a. stacked c. bonded
b. cascading d. hooked
ANS: B PTS: 1 REF: 143
11. Most languages allow you to use a variation of the decision structure called the ____ structure
when you must nest a series of decisions about a single variable.
a. blocked c. AND IF
b. case d. logical
ANS: B PTS: 1 REF: 144
12. Most programming languages allow you to ask two or more questions in a single comparison by
using an ____ operator that joins decisions in a single statement.
a. AND c. IF
b. OR d. XOR
ANS: A PTS: 1 REF: 146
13. When creating a truth table, you must determine how many possible Boolean value combinations
exist for the conditions. If there are two conditions, ____ combinations will exist.
a. 2 c. 8
b. 4 d. 16
ANS: B PTS: 1 REF: 147
14. In a truth table, the expression ____ is true.