VERIFIED ANSWERS
When one loop appears inside another, the loop that contains the other loop is called
the ____ loop. - Answer- outer
Usually, when you create nested loops, each loop has its own ____. - Answer- loop
control variable
A mistake programmers often make with loops is that they ____. - Answer- include
statements inside the loop that belong outside the loop
A mistake programmers often make with loops is that they ____. - Answer- neglect to
initialize the loop control variable prior to entering the loop body
A comparison is correct only when the correct ____ and operator are used. - Answer-
operands
Programmers use the term ____ to describe programs that are well designed and easy
to understand and maintain - Answer- elegant
You usually use the for loop with ____ loops. - Answer- definite
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
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