Ch 3 Review Questions Programming
Logic and Design Complete Answers
Attaching structures end to end is called ____________.
a. stacking
b. untangling
c. building
d. nesting - ANSWER-a. stacking
The statement if age >= 65 then senior Discount = "yes" is an example of a
_________________.
a. sequence
b. loop
c. dual-alternative selection
d. single-alternative selection - ANSWER-c. dual- alternative selection
The statement while temperature remains below 60, leave the furnace on is an
example of a
a. sequence
b. loop
c. dual-alternative selection
d. single-alternative selection - ANSWER-b. loop
The statement if age < 13 then movieTicket = 4.00 else movieTicket = 8.50 is an
example of a
a. sequence
b. loop
c. dual-alternative selection
d. single-alternative selection - ANSWER-b. dual-alternative selection
Which of the following attributes do all three basic structures share?
a. Their flowcharts all contain exactly three processing symbols
b. They all have one entry and one exit point
c. They all contain a decision
d. They all begin with a process - ANSWER-b. They all have one entry and one exit
point
Which is true of stacking structures?
a. Two incidences of the same structure cannot be stacked adjacently
b. When you stack structures, you cannot nest them in the same program
c. Each structure has only on point where it can be stacked on top of another
d. When you stack structures, the top structure must be a sequence - ANSWER-d.
When you stack structures, the top structure must be a sequence.
When you input data in a loop within a program, the input statement that precedes
the loop _________.
Logic and Design Complete Answers
Attaching structures end to end is called ____________.
a. stacking
b. untangling
c. building
d. nesting - ANSWER-a. stacking
The statement if age >= 65 then senior Discount = "yes" is an example of a
_________________.
a. sequence
b. loop
c. dual-alternative selection
d. single-alternative selection - ANSWER-c. dual- alternative selection
The statement while temperature remains below 60, leave the furnace on is an
example of a
a. sequence
b. loop
c. dual-alternative selection
d. single-alternative selection - ANSWER-b. loop
The statement if age < 13 then movieTicket = 4.00 else movieTicket = 8.50 is an
example of a
a. sequence
b. loop
c. dual-alternative selection
d. single-alternative selection - ANSWER-b. dual-alternative selection
Which of the following attributes do all three basic structures share?
a. Their flowcharts all contain exactly three processing symbols
b. They all have one entry and one exit point
c. They all contain a decision
d. They all begin with a process - ANSWER-b. They all have one entry and one exit
point
Which is true of stacking structures?
a. Two incidences of the same structure cannot be stacked adjacently
b. When you stack structures, you cannot nest them in the same program
c. Each structure has only on point where it can be stacked on top of another
d. When you stack structures, the top structure must be a sequence - ANSWER-d.
When you stack structures, the top structure must be a sequence.
When you input data in a loop within a program, the input statement that precedes
the loop _________.