Correct Answers
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. - Answer-
case
For maximum efficiency, a good rule of thumb in an AND decision is to ____. - Answer-
first ask the question that is more likely to be false
Most programming languages allow you to ask two or more questions in a single
comparison by using a(n) ____ operator that joins decisions in a single statement. -
Answer-and
The conditional AND operator in Java, C++, and C# is ____. - Answer-&&
____ are diagrams used in mathematics and logic to help describe the truth of an entire
expression based on the truth of its parts. - Answer-truth tables
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. - Answer-four
In a truth table, the expression ____ is true. - Answer-true and true
____ evaluation is when each part of an expression that uses an operator is evaluated
only as far as necessary to determine whether the entire expression is true or false. -
Answer-short circuit
For maximum efficiency, a good rule of thumb in an OR decision is to ____. - Answer-
first ask the question that is more likely to be true
When you use the logical ____ operator, only one of the listed conditions must be met
for the resulting action to take place. - Answer-or
In a truth table, the expression ____ is false. - Answer-false or false
C#, C++, C, and Java use the symbol ____ as the logical OR operator. - Answer-||
You use the logical ____ operator to reverse the meaning of a Boolean expression. -
Answer-not
, You can perform a ____ by making comparisons using either the lowest or highest
value in a range of values. - Answer-range check
Programs that use _____ code logic are unstructured programs that do not follow the
rules of structured logic. - Answer-spaghettia
With a(n) ____, you perform an action or task, and then you perform the next action, in
order. - Answer-sequence structure
The following pseudocode is an example of a ____ structure.
get firstNumber
get secondNumber
add firstNumber and secondNumber
print result - Answer-sequence
Pseudocode uses the end-structure statement ____ to clearly show where the structure
ends. - Answer-endif
The following pseudocode is an example of a ____ structure.
if firstNumber is bigger than secondNumber then
print firstNumber
else
print secondNumber
endif - Answer-decision
Fill in the blank in the following pseudocode:
if someCondition is true then
do oneProcess
____
do theOtherProcess
endif - Answer-else
if-else examples can also be called ____ because they contain the action taken when
the tested condition is true and the action taken when it is false. - Answer-dual-
alternative selections
The action or actions that occur within a loop are known as a(n) ____. - Answer-loop
body
You may hear programmers refer to looping as ____. - Answer-iteration
The following pseudocode is an example of a ____ structure.
get number
while number is positive
add to sum
get number