A programming language's rules are its ________________________. - syntax
Which of the following pairs of steps in the programming process is in the correct order? - code
the program, translate it into machine language
A programmer's most important task before planning the logic to a program is to
________________________. - understand the problem
Writing a program in a language such as C++ or Java is known as ______________________
the program. - coding
A compiler would find all of the following programming errors, except
___________________________. - newBalanceDue calculated by adding customerPayment to
oldBalanceDue instead of substracting it
Which of the following is not a legal variable name in any programming language? - semester
grade
The structure in which you ask a question and, depending on the answer, take some action and
then ask the question again, can be called all of the following except
_____________________________. - if-then-else
The statement if age >= 65 then seniorDiscount = "yes" is an example of a
__________________________. - single-alternative selection
Which of the following attributes do all three basic structures share? - They all have one entry
and one exit point.
When you read input in a loop within a program, the input statement that precedes the loop
________________. - is called a priming input
A group of statements that execute as a unit is a _____________________. - block
Which of the following is not a reason for enforcing structure rules in computer programs? -
Structured programs usually are shorter than unstructured ones.
The selection statement if dayOfWeek = "Sunday" then price = LOWER_PRICE else price =
HIGHER_PRICE is an example of a _________________________. - dual-alternative selection
All selection statements must have _________________________ - an if clause
Usually, you compare only variables that have the same ___________________________. - type
if a > b? is false, then which of the following is always true? - a <= b?
, The Boffo Balloon Company makes helium balloons in three sizes, 12 colors, and a choice of 40
imprinted sayings. As a promotion, the company is offering a 25 percent discount on orders of
large, red "Happy Valentine's Day" balloons. To most efficiently select the orders to which a
discount applies, you would use _____________________. - nested if statements using AND
logic
Assume that a is 10 and b is 20. Which of the following evaluates to true? - a <= 10 OR b > a
AND a <> b?
In the following pseudocode how many times is "Adios" output if p = 2 and q = 4?
while p < q
output "Adios"
r=1
while r < q
output "Adios"
r=r+1
endwhile
p=p+1
endwhile - 8
The structure that allows one set of instructions to operate on multiple, separate sets of data is the
_____. - loop
The statements executed within a loop are known collectively as the _____. - loop body
When you know the number of times a loop will execute when a program runs, it is a(n) _____
loop. - definite
Most programmers use a for loop _____. - when they know the exact number of times a loop will
repeat
When two loops are nested, the loop that is contained by the other is the _____ loop. - inner
If you mistakenly omit the statement that alters a loop control variable, the most likely result is
_____. - an infinite loop
Java programs run in the following environments: ________________________. - all of the
above
Java is very similar to C# and a programmer familiar with one language can easily learn the
other. - True
A variable declared as type double can store _____________________. - a 64-bit value used to
represent numbers with fractional parts