Deck 2: Understanding Structure

Full screen (f)
exit full mode
Question
Most newer computer languages are unstructured and use syntax that lets you deal efficiently with sequence,selection,and looping.
Use Space or
up arrow
down arrow
to flip the card.
Question
A ____ can contain any number of tasks,but there is no chance to branch off and skip any of the tasks.

A) selection
B) sequence
C) decision
D) case
Question
As programs get bigger,they get more confusing if they're not structured.
Question
Programming structures can be combined in an infinite number of ways.
Question
In code,it is perfectly correct for one branch of the selection to be a "do nothing" branch.
Question
In a structured program,structures can be stacked or connected to one another only at their start or exit points.
Question
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.

A) do loops
B) repetition
C) single-alternative selections
D) dual-alternative selections
Question
The following pseudocode is an example of a(n)____ structure. get firstNumber
Get secondNumber
Add firstNumber and secondNumber
Print result

A) decision
B) task
C) selection
D) sequence
Question
Programs that do not follow the rules of structured logic are ____ programs.

A) structured
B) scrambled
C) unstructured
D) disorganized
Question
With a(n)____ structure,you perform an action or task,and then you perform the next action in order.

A) loop
B) decision
C) assignment
D) sequence
Question
Programs that use ____ code are so difficult to alter that when improvements are required,developers often find it easier to abandon the existing program and start from scratch.

A) preplanned
B) spaghetti
C) structured
D) rapid
Question
Professional programmers find it just as easy to modify and maintain structured programs as unstructured programs.
Question
A sequence can contain any number of tasks,but there is no chance to branch off and skip any of the tasks.
Question
Whether you are drawing a flowchart or writing pseudocode,to represent decision outcomes you can use either: Yes and No,or True and False.
Question
With a decision structure or ____ structure you ask a question,and,depending on the answer,you take one of two courses of action.

A) loop
B) branch
C) selection
D) logic
Question
The popular name for logically snarled program statements is ____ code.

A) noodle
B) meatloaf
C) spaghetti
D) puzzle
Question
The following pseudocode is an example of a ____ structure. if firstNumber is bigger than secondNumber then
Print firstNumber
Else
Print secondNumber

A) sequence
B) selection
C) spaghetti
D) loop
Question
A ____ is a basic unit of programming logic; each structure is a sequence,selection,or loop.

A) structure
B) block
C) program
D) subprogram
Question
You can replace any individual tasks or steps in a structured flowchart diagram or pseudocode segment with additional structures.
Question
Any program,no matter how complicated,can be constructed using one or more of only four structures.
Question
Years ago,programmers could avoid using structure by inserting a ____ statement into their pseudocode.

A) go to
B) go sub
C) branch
D) jump
Question
Some programmers call structured programming ____ programming.

A) "go-to"
B) "goto-less"
C) procedural
D) branching
Question
The endif and endwhile statements are know as ____ statements.

A) end-structure
B) end-decision
C) end-loop
D) end-module
Question
You can use an ____ statement to clearly show where the actions that depend on a decision end.

A) end
B) else
C) endif
D) if
Question
A repetition or iteration loop is known as a(n)____ structure.

A) while…do
B) do…while
C) if…do
D) do…if
Question
All logic problems can be solved using only the three structures-____.

A) sequence,assignment,and loop
B) sequence,selection,and loop
C) sequence,loop,and assignment
D) selection,loop,and assignment
Question
The ____ used in the pseudocode reflects the logic you can see laid out graphically in the flowchart.

A) shape
B) indentation
C) font
D) color
Question
A group of statements that executes as a single unit is a(n)____.

A) module
B) unit
C) bunch
D) block
Question
Placing a structure within another structure is called ____.

A) stacking
B) nesting
C) including
D) cascading
Question
In a ____ structure,you continue to repeat actions while a condition is true.

A) sequence
B) loop
C) selection
D) decision
Question
____ structures are attached end-to-end.

A) Stacking
B) Selecting
C) Connecting
D) Building
Question
One way to straighten out an unstructured flowchart segment is to use the "____" method.

A) detective
B) spaghetti code
C) pasta bowl
D) spaghetti bowl
Question
A ____ input is the statement that reads the first input value in a program.

A) priming
B) starting
C) begin
D) sentinel
Question
The following pseudocode is an example of a ____ structure. if on the beach
Use sunscreen

A) do loop
B) repetition
C) single-alternative selections
D) dual-alternative selections
Question
In a loop,if the answer to the question results in the loop being entered and the loop statements executing,then the logic ____.

A) goes to the next statement
B) returns to the top of the sequence
C) returns to the question that started the loop
D) returns to the controlling unit
Question
For convenience,many programming languages allow two supplemental structures-the do loop and the ____ structure.

A) process
B) crate
C) case
D) more
Question
In structured programs,structures can be stacked or connected to one another only at their entry point or ____.

A) endif statement
B) connection point
C) end point
D) exit point
Question
The purpose of the ____ input step is to control the upcoming loop.

A) sentinel
B) start
C) begin
D) priming
Question
Structured programs can be easily broken down into routines or ____ that can be assigned to any number of programmers.

A) processes
B) modules
C) units
D) pieces
Question
The action or actions that occur within a loop are known as ____.

A) loop workings
B) loop body
C) action body
D) inner workings
Question
Write structured pseudocode to show the following: when you are on time for work you have time to buy coffee.
Question
You make the cookies,following the instructions step by step and then deciding to either bake them in the oven or microwave.This is an example of ____.

A) stacking structures
B) nesting structures
C) end-structure
D) loop structure
Question
Write structured pseudocode to show the following: If you are at home,get comfortable and take a nap while you are sleepy,otherwise do not take a nap.
Question
You follow the recipe step by step.This is an example of a ____ structure.

A) sequence
B) selection
C) while
D) loop
Question
You realize that the recipe has both the instructions for baking the cookies in the oven or the microwave.This is an example of a ____ structure.

A) sequence
B) single-alternative selection
C) dual-alternative selection
D) loop
Question
Write structured pseudocode to show the following: wash and dry your face if is dirty.
Question
Write structured pseudocode to indicate that you will keep drying your hair while it is still wet.
Question
One of your friends at work eats one of your cookies and says it would be great if you could bring more of these cookies to the Monday status meeting.If it is Sunday night,you make the cookies for Monday's meeting.This is an example of a ____ structure.

A) sequence
B) single-alternative selection
C) dual-alternative selection
D) loop
Question
Write structured pseudocode to show the following: print "Reorder" when the quantity is less than 20; otherwise print "OK".
Question
Every day,you bring two cookies to work until you run out of cookies at home.This is an example of a ____ structure.

A) sequence
B) single-alternative selection
C) dual-alternative selection
D) loop
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 2: Understanding Structure
1
Most newer computer languages are unstructured and use syntax that lets you deal efficiently with sequence,selection,and looping.
False
2
A ____ can contain any number of tasks,but there is no chance to branch off and skip any of the tasks.

A) selection
B) sequence
C) decision
D) case
B
3
As programs get bigger,they get more confusing if they're not structured.
True
4
Programming structures can be combined in an infinite number of ways.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
In code,it is perfectly correct for one branch of the selection to be a "do nothing" branch.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
In a structured program,structures can be stacked or connected to one another only at their start or exit points.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
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.

A) do loops
B) repetition
C) single-alternative selections
D) dual-alternative selections
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
The following pseudocode is an example of a(n)____ structure. get firstNumber
Get secondNumber
Add firstNumber and secondNumber
Print result

A) decision
B) task
C) selection
D) sequence
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
Programs that do not follow the rules of structured logic are ____ programs.

A) structured
B) scrambled
C) unstructured
D) disorganized
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
With a(n)____ structure,you perform an action or task,and then you perform the next action in order.

A) loop
B) decision
C) assignment
D) sequence
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
Programs that use ____ code are so difficult to alter that when improvements are required,developers often find it easier to abandon the existing program and start from scratch.

A) preplanned
B) spaghetti
C) structured
D) rapid
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
Professional programmers find it just as easy to modify and maintain structured programs as unstructured programs.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
A sequence can contain any number of tasks,but there is no chance to branch off and skip any of the tasks.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
Whether you are drawing a flowchart or writing pseudocode,to represent decision outcomes you can use either: Yes and No,or True and False.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
With a decision structure or ____ structure you ask a question,and,depending on the answer,you take one of two courses of action.

A) loop
B) branch
C) selection
D) logic
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
The popular name for logically snarled program statements is ____ code.

A) noodle
B) meatloaf
C) spaghetti
D) puzzle
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
The following pseudocode is an example of a ____ structure. if firstNumber is bigger than secondNumber then
Print firstNumber
Else
Print secondNumber

A) sequence
B) selection
C) spaghetti
D) loop
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
A ____ is a basic unit of programming logic; each structure is a sequence,selection,or loop.

A) structure
B) block
C) program
D) subprogram
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
You can replace any individual tasks or steps in a structured flowchart diagram or pseudocode segment with additional structures.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
Any program,no matter how complicated,can be constructed using one or more of only four structures.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
Years ago,programmers could avoid using structure by inserting a ____ statement into their pseudocode.

A) go to
B) go sub
C) branch
D) jump
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
Some programmers call structured programming ____ programming.

A) "go-to"
B) "goto-less"
C) procedural
D) branching
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
The endif and endwhile statements are know as ____ statements.

A) end-structure
B) end-decision
C) end-loop
D) end-module
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
You can use an ____ statement to clearly show where the actions that depend on a decision end.

A) end
B) else
C) endif
D) if
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
A repetition or iteration loop is known as a(n)____ structure.

A) while…do
B) do…while
C) if…do
D) do…if
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
All logic problems can be solved using only the three structures-____.

A) sequence,assignment,and loop
B) sequence,selection,and loop
C) sequence,loop,and assignment
D) selection,loop,and assignment
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
The ____ used in the pseudocode reflects the logic you can see laid out graphically in the flowchart.

A) shape
B) indentation
C) font
D) color
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
A group of statements that executes as a single unit is a(n)____.

A) module
B) unit
C) bunch
D) block
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
Placing a structure within another structure is called ____.

A) stacking
B) nesting
C) including
D) cascading
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
In a ____ structure,you continue to repeat actions while a condition is true.

A) sequence
B) loop
C) selection
D) decision
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
____ structures are attached end-to-end.

A) Stacking
B) Selecting
C) Connecting
D) Building
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
One way to straighten out an unstructured flowchart segment is to use the "____" method.

A) detective
B) spaghetti code
C) pasta bowl
D) spaghetti bowl
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
A ____ input is the statement that reads the first input value in a program.

A) priming
B) starting
C) begin
D) sentinel
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
The following pseudocode is an example of a ____ structure. if on the beach
Use sunscreen

A) do loop
B) repetition
C) single-alternative selections
D) dual-alternative selections
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
In a loop,if the answer to the question results in the loop being entered and the loop statements executing,then the logic ____.

A) goes to the next statement
B) returns to the top of the sequence
C) returns to the question that started the loop
D) returns to the controlling unit
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
For convenience,many programming languages allow two supplemental structures-the do loop and the ____ structure.

A) process
B) crate
C) case
D) more
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
In structured programs,structures can be stacked or connected to one another only at their entry point or ____.

A) endif statement
B) connection point
C) end point
D) exit point
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
The purpose of the ____ input step is to control the upcoming loop.

A) sentinel
B) start
C) begin
D) priming
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
Structured programs can be easily broken down into routines or ____ that can be assigned to any number of programmers.

A) processes
B) modules
C) units
D) pieces
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
The action or actions that occur within a loop are known as ____.

A) loop workings
B) loop body
C) action body
D) inner workings
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
Write structured pseudocode to show the following: when you are on time for work you have time to buy coffee.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
You make the cookies,following the instructions step by step and then deciding to either bake them in the oven or microwave.This is an example of ____.

A) stacking structures
B) nesting structures
C) end-structure
D) loop structure
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
Write structured pseudocode to show the following: If you are at home,get comfortable and take a nap while you are sleepy,otherwise do not take a nap.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
You follow the recipe step by step.This is an example of a ____ structure.

A) sequence
B) selection
C) while
D) loop
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
You realize that the recipe has both the instructions for baking the cookies in the oven or the microwave.This is an example of a ____ structure.

A) sequence
B) single-alternative selection
C) dual-alternative selection
D) loop
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
Write structured pseudocode to show the following: wash and dry your face if is dirty.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
Write structured pseudocode to indicate that you will keep drying your hair while it is still wet.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
One of your friends at work eats one of your cookies and says it would be great if you could bring more of these cookies to the Monday status meeting.If it is Sunday night,you make the cookies for Monday's meeting.This is an example of a ____ structure.

A) sequence
B) single-alternative selection
C) dual-alternative selection
D) loop
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
Write structured pseudocode to show the following: print "Reorder" when the quantity is less than 20; otherwise print "OK".
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
Every day,you bring two cookies to work until you run out of cookies at home.This is an example of a ____ structure.

A) sequence
B) single-alternative selection
C) dual-alternative selection
D) loop
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.