• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/39

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

39 Cards in this Set

  • Front
  • Back
Spaghetti Code
Spaghetti Code is snarled, unstructured program logic
Unstructured programss
Unstructured programs that do follow the rules of structured logic
Structure
A structure is a basic unit of programming logic; each structure is a sequence, selection, or loop
Sequence Structure
A Sequence structure contains a series of steps executed in order. A sequence can contain any number of tasks, but there is no option to branch off and skip any of the taks
selection struction
A selection structure or decision structure contains a questions, and, depending on the answer, takes one of two courses of action before continuing with the next task
end structure statement
An end-structure statement designates the end of a pseudocode structure
what is another name for an "if-then-else" statement
An if-then-else is another name for a selection structure
Dual-alternative ifs
Dual-alternative ifs (or dual-alternative selections) define one action to be taken when the tested condition is true and another action to be taken when it is false
Single -alternatives ifs
Single alternatives ifs (or single-alternative selections) take action on just one branch of the decision.
null case
The null case is the branch of a decision in which no action is taken
loop structure
A loop structure continues to repeat actions while a test condition remains true
Repetition and iternation
Repetition and iteration are alternate names for loop structure
while...do
In a while...do, or more simply a while loop, a process continues while some condition continues to be true
Stacking Structures
Stacking Structures is the act of attaching structures end to end
Nesting Structure
Nesting Structure is the act of placing a structure within another structure
block
A block is a group of statements that executes as a single unit
priming input
A priming input or priming read is the statement that reads the first input data record prior to starting a structured loop
Goto-less Programming
Goto-less programming is a name to describe structured programming, because structure programmers do not use a "go to" statement
What are 3 basic structures
- sequence

- selection

- loop
1. Snarled program logic is called _______code
a. Snake
b. Spaghetti
c. String
d. Gnarly
b. Spaghetti
2. The three structures of structured programming are _____________.
a. Sequence, order, and process
b. Selection, loop, and iteration
c. Sequence, selection and loop
d. If, else, and then
c. Sequence, selection and loop
3. A sequence structure can contain
a. Any number of tasks
b. Exactly three tasks
c. No more than 3 tasks
d. Only one task
a. Any number of tasks
4. Which of the following is not another term for selection structure
a. Decision structure
b. If-then-else structure
c. Dual-alternative if structure
d. Loop structure
d. Loop structure
5. 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, a(n)
a. Iteration
b. Loop
c. Repetition
d. If-then-else
d. If-then-else
6. Placing a structure within another structure is called _________ the structures
a. Stacking
b. Untangling
c. Building
d. Nesting
d. Nesting
7. Attaching structures end to end is called ________________.
a. Stacking
b. Untangling
c. Building
d. Nesting
a. Stacking
8. 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
d. single-alternative selection
9. 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
b. Loop
10. The statement if age < 13 than movietickets = 4.00 else movieTicket = 8.50 is an example of a __________.
a. Sequence
b. Loop
c. Dual-alternative selection
d. Single-alternative selection
c. Dual-alternative selection
11. 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
b. They all have one entry and one exit point
12. 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 one point where it can be stacked on top of another
d. When you stack structures, the top structure must be a sequence
c. Each structure has only one point where it can be stacked on top of another
13. When you input data in a loop within a program, the input statement that precedes the loop _________.
a. Is the only part of the program allowed to be unstructured
b. Cannot result in eof
c. Is called a priming input
d. Executes hundreds or even thousands of times in most business programs
c. Is called a priming input
14. A group of statements that executes a as a unit is a
a. Block
b. Family
c. Chunk
d. Cohort
a. Block
15. Which of the following is acceptable in a structured program?
a. Placing a sequence within the true half of a dual-alternative decision
b. Placing a decision within a loop
c. Placing a loop within one of the steps in a sequence
d. All of these are acceptable
d. All of these are acceptable
16. In a selection structure, the structure-controlling question is ______________.
a. Asked once at the beginning of the structure
b. Asked once at the end of the structure
c. Asked repeatedly until it is false
d. Asked repeatedly until it is true
a. Asked once at the beginning of the structure
17. When a loop executes, the structure-controlling questions is _____________
a. Asked exactly once
b. Never asked more than once
c. Asked either before or after the loop body executes
d. Asked only if it is true, and not asked if it is false
c. Asked either before or after the loop body executes
18. Which of the following is not a reason for enforcing structure rules in computer program?
a. Structured programs are clearer to understand than unstructured ones
b. Other professional programmers will expect programs to be structured
c. Structured programs usually are shorter than unstructured ones
d. Structured programs can be broken down into modules easily
c. Structured programs usually are shorter than unstructured ones
19. Which of the following is not a benefit of modularizing programs
a. Modular programs are easier to read and understand than nonmodular ones
b. If you use modules, you can ignore the rules of structure
c. Modular components are reusable in other programs
d. Multiple programmers can work on different modules at the same time
b. If you use modules, you can ignore the rules of structure
20. Which of the following is true of structured logic?
a. You can use structure logic with newer programming languages, such as Java and C#, but not with older ones
b. Any task can be described using some combination of the three structures
c. Structured programs require that you break code into easy-to-handle modules that each contain no more than five actions
d. All of these are true
b. Any task can be described using some combination of the three structures