2 points
Question 31
1.
Although it is not
a requirement of any programming language, it frequently makes sense to use
____ as all or part of a variable’s name if the variable that holds a status.
Answer
|
the
verb to be
|
|
|
a
verb
|
|
|
the
word status
|
|
|
the
abbreviation stat
|
2 points
Question 32
1.
Boolean expressions
are named after ____.
Answer
|
Harold
Boolean
|
|
|
Henry
Boole
|
|
|
George
Boole
|
|
|
Gerhardt
Boolean
|
2 points
Question 33
1.
Which of the
following is a Java inline comment?
Answer
|
//
|
|
|
#
|
|
|
$
|
|
|
REM
|
2 points
Question 34
1.
When you need to
ask multiple questions before an outcome is determined, you must create a(n)
____ condition.
Answer
|
dual-alternative
|
|
|
nested
|
|
|
single-alternative
|
|
|
compound
|
2 points
Question 35
1.
A series of nested if statements
can also be called a(n) ____ statement.
Answer
|
n-alternative if
|
|
|
cascading if
|
|
|
case
|
|
|
loop
|
2 points
Question 36
1.
____ are diagrams
used in mathematics and logic to help describe the truth of an entire
expression based on the truth of its parts.
Answer
|
Decision
matrices
|
|
|
Decision
diagrams
|
|
|
Truth
diagrams
|
|
|
Truth
tables
|
2 points
Question 37
1.
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
|
|
|
first
ask the question that is more likely to be false
|
|
|
rewrite
as an and decision and ask the question more likely to be true
|
|
|
rewrite
as an and decision and ask the question more likely to be false
|
2 points
Question 38
1.
The type of nested if-then-else structure
that could be replaced with a case structure is
____.
Answer
|
inner
nested if within
the if portion of
the outer if
|
|
|
inner if within
the else portion of
the outer if
|
|
|
one
that uses a logical AND
|
|
|
one
that uses a logical OR
|
2 points
Question 39
1.
When creating a
decision table, you must determine how many possible Boolean value combinations
exist for the conditions. If there are two conditions, ____ combinations will exist.
Answer
|
2
|
|
|
4
|
|
|
8
|
|
|
16
|
2 points
Question 40
1.
The first step in a
loop is typically ____.
Answer
|
compare
the variable to a value that determines if the loop stops or continues
|
|
|
initialize
the variable
|
|
|
increment
the variable
|
|
|
perform
the loop action
|
2 points
Question 41
1.
The last step in a
loop is usually ____.
Answer
|
compare
the variable to a value that determines if the loop stops or continues
|
|
|
initialize
the variable
|
|
|
increment
the variable
|
|
|
perform
the loop action
|
2 points
Question 42
1.
The piece of
pseudocode that represents incrementing the loop control variable is ____.
Answer
|
rep = 1
|
|
|
rep = rep + 1
|
|
|
while (rep < 5)
|
|
|
print “warning”
|
2 points
Question 43
1.
When a value is incremented
____.
Answer
|
1
is added to the value
|
|
|
1
is subtracted from the value
|
|
|
the
value is multiplied by 1
|
|
|
the
value is divided by 1
|
2 points
Question 44
1.
A loop within
another loop is known as a(n) ____ loop.
Answer
|
indefinite
|
|
|
infinite
|
|
|
nested
|
|
|
hidden
|
2 points
Question 45
1.
When one loop
appears inside another, the loop that contains the other loop is called the
____ loop.
Answer
|
indefinite
|
|
|
definite
|
|
|
inner
|
|
|
outer
|
2 points
Question 46
1.
When a loop control
variable is not altered during loop execution, a(n) ____ loop may result.
Answer
|
enlarged
|
|
|
infinite
|
|
|
broken
|
|
|
default
|
2 points
Question 47
1.
The ____ loop
provides three actions in one compact statement.
Answer
|
for
|
|
|
while
|
|
|
do until
|
|
|
repeat
|
2 points
Question 48
1.
In a for loop, a(n)
____ value is used to control how the loop control variable is incremented.
Answer
|
step
|
|
|
group
|
|
|
id
|
|
|
sentinel
|
2 points
Question 49
1.
Sometimes a ____
loop is called a repeat until loop.
Answer
|
for
|
|
|
while
|
|
|
do until
|
|
|
repeat
|
2 points
Question 50
1.
The statement that
is true of a structured loop is that ____.
Answer
|
the
loop can exit from any point
|
|
|
the
loop body must execute at least once
|
|
|
the
loop condition represents the only exit from the loop
|
|
|
the
loop can repeat an infinite number of times
|
2 points
Answers:
·
Question 1
2 out of 2 points
|
When data items are stored for use on computer systems, they are
often stored in what is known as a data hierarchy.
Answer
|
||||
|
·
Question 2
2 out of 2 points
|
Whenever
a main program calls a module, the logic transfers to the main program.
Answer
|
||||
|
·
Question 3
2 out of 2 points
|
When
you must 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.
Answer
|
||||
|
·
Question 4
2 out of 2 points
|
A
decision table consists of four parts.
Answer
|
||||
|
·
Question 5
2 out of 2 points
|
____ data items may involve organizing them, checking them for
accuracy, or performing mathematical operations on them.
Answer
|
||||
|
·
Question 6
2 out of 2 points
|
____
errors are detected by a compiler.
Answer
|
||||
|
·
Question 7
2 out of 2 points
|
After
a programmer plans the logic of a program, the next step is ____.
Answer
|
||||
|
·
Question 8
2 out of 2 points
|
Typically, a programmer develops a program’s logic, writes the
code, and then ____ the program, which may generate a list of syntax errors.
Answer
|
||||
|
·
Question 9
2 out of 2 points
|
Using ____ involves writing down all the steps you will use in a
program.
Answer
|
||||
|
·
Question 10
2 out of 2 points
|
A variable name is also called a(n) ____.
Answer
|
||||
|
·
Question 11
2 out of 2 points
|
The
best choice for a variable name representing an interest rate is ____.
Answer
|
||||
|
·
Question 12
2 out of 2 points
|
A
program with a(n) ____ never ends.
Answer
|
||||
|
·
Question 13
2 out of 2 points
|
If a flowchart has six processing steps and a page provides room
for only three, you
can use a ____ to create the completed flowchart.
Answer
|
||||
|
·
Question 14
2 out of 2 points
|
The
problem with the following statement is that ____.
100 = grade
Answer
|
||||
|
·
Question 15
2 out of 2 points
|
The
following pseudocode is an example of a(n) ____ structure:
get number while number is positive add to sum get number
Answer
|
||||
|
·
Question 16
2 out of 2 points
|
Another
name for a loop structure is ____.
Answer
|
||||
|
·
Question 17
2 out of 2 points
|
The
maximum number of entry points that any programming structure can have is
____.
Answer
|
||||
|
·
Question 18
2 out of 2 points
|
Suppose
a program will read 100 data records, and you read the first data record in a
statement that is separate from the other 99. This is called a ____ read.
Answer
|
||||
|
·
Question 19
2 out of 2 points
|
One
way to straighten out a flowchart segment that is not structured is to use
what is called the “____” method.
Answer
|
||||
|
·
Question 20
2 out of 2 points
|
A case structure
can be replaced by one or more ____ structures.
Answer
|
||||
|
·
Question 21
2 out of 2 points
|
____
documentation includes all the supporting paperwork that programmers develop
before they write a program.
Answer
|
||||
|
·
Question 22
2 out of 2 points
|
The
____ of documentation is typically written first.
Answer
|
||||
|
·
Question 23
2 out of 2 points
|
If
you are producing a report from stored data, you frequently will be provided
with a(n) ____ that describes the data contained in a file.
Answer
|
||||
|
·
Question 24
2 out of 2 points
|
____
is the process of paying attention to important properties while ignoring
nonessential details.
Answer
|
||||
|
·
Question 25
2 out of 2 points
|
Newer
____ programming languages allow you to use English-like vocabulary in which
one broad statement corresponds to dozens of machine instructions.
Answer
|
||||
|
·
Question 26
2 out of 2 points
|
If
a subroutine or function is useful and well-written, you may want to use it
more than once within a program or in other programs. This is known as ____.
Answer
|
||||
|
·
Question 27
2 out of 2 points
|
In
a flowchart, you draw each module separately with its own sentinel symbols.
The symbol that is the equivalent of the start symbol in a program contains
the ____.
Answer
|
||||
|
·
Question 28
2 out of 2 points
|
The
____ statement is used to indicate the end of a module.
Answer
|
||||
|
·
Question 29
2 out of 2 points
|
The
computer keeps track of the correct memory address to which it should return
after executing a module by recording the memory address in a location known
as the ____.
Answer
|
||||
|
·
Question 30
2 out of 2 points
|
A
variable that is used known to the entire program is a ____ variable.
Answer
|
||||
|
·
Question 31
2 out of 2 points
|
Although
it is not a requirement of any programming language, it frequently makes
sense to use ____ as all or part of a variable’s name if the variable that
holds a status.
Answer
|
||||
|
·
Question 32
2 out of 2 points
|
Boolean
expressions are named after ____.
Answer
|
||||
|
·
Question 33
2 out of 2 points
|
Which
of the following is a Java inline comment?
Answer
|
||||
|
·
Question 34
2 out of 2 points
|
When
you need to ask multiple questions before an outcome is determined, you must
create a(n) ____ condition.
Answer
|
||||
|
·
Question 35
2 out of 2 points
|
A
series of nested if statements
can also be called a(n) ____ statement.
Answer
|
||||
|
·
Question 36
2 out of 2 points
|
____
are diagrams used in mathematics and logic to help describe the truth of an
entire expression based on the truth of its parts.
Answer
|
||||
|
·
Question 37
2 out of 2 points
|
For
maximum efficiency, a good rule of thumb in an OR decision
is to ____.
Answer
|
||||
|
·
Question 38
2 out of 2 points
|
The
type of nested if-then-else structure
that could be replaced with a case structure is
____.
Answer
|
||||
|
·
Question 39
2 out of 2 points
|
When
creating a decision table, you must determine how many possible Boolean value
combinations exist for the conditions. If there are two conditions, ____
combinations will exist.
Answer
|
||||
|
·
Question 40
2 out of 2 points
|
The
first step in a loop is typically ____.
Answer
|
||||
|
·
Question 41
2 out of 2 points
|
The
last step in a loop is usually ____.
Answer
|
||||
|
·
Question 42
2 out of 2 points
|
The
piece of pseudocode that represents incrementing the loop control variable is
____.
Answer
|
||||
|
·
Question 43
2 out of 2 points
|
When
a value is incremented ____.
Answer
|
||||
|
·
Question 44
2 out of 2 points
|
A
loop within another loop is known as a(n) ____ loop.
Answer
|
||||
|
·
Question 45
2 out of 2 points
|
When
one loop appears inside another, the loop that contains the other loop is
called the ____ loop.
Answer
|
||||
|
·
Question 46
2 out of 2 points
|
When
a loop control variable is not altered during loop execution, a(n) ____ loop
may result.
Answer
|
||||
|
·
Question 47
2 out of 2 points
|
The
____ loop provides three actions in one compact statement.
Answer
|
||||
|
·
Question 48
2 out of 2 points
|
In
a for loop, a(n) ____ value is used to control how the loop control variable
is incremented.
Answer
|
||||
|
·
Question 49
2 out of 2 points
|
Sometimes
a ____ loop is called a repeat until loop.
Answer
|
||||
|
·
Question 50
2 out of 2 points
|
The
statement that is true of a structured loop is that ____.
Answer
|
||||
|
No comments:
Post a Comment