Deck 3: Making Decisions

Full screen (f)
exit full mode
Question
The selection structure can be called an if-then structure.
Use Space or
up arrow
down arrow
to flip the card.
Question
All modern programming languages support ____ types of relational comparison operators.

A)two
C)four
B)three
D)six
Question
In pseudocode, a(n) ____ statement is used to clearly show where the selection structure ends.

A)end
C)endifelse
B)endif
D)stop
Question
You can ask every programming question by using one of only four types of comparison operators in a Boolean expression.
Question
Besides being awkward to use, the "____" comparison operator is the one most likely to be different in various programming languages.

A)equal to
C)not equal to
B)greater than
D)less than
Question
A(n) ____ expression is one that represents only one of two states, usually expressed as true or false.

A)alternative
C)Boolean
B)dual
D)double
Question
When you combine AND and OR operators within the same statement, the AND operators take precedence.
Question
You use the ____ operator to reverse the meaning of a Boolean expression.

A)duplicate
C)logical NOT
B)reverse
D)unequal
Question
For greatest program efficiency when using the OR operator, first ask the question that is more likely to be true.
Question
In a flowchart or in pseudocode, you can use the symbol that mathematicians use to mean "not equal," which is ____.

A)an equal sign with an octagon over it
C)an equal sign with a slash after it
B)an equal sign with a circle around it
D)an equal sign with a slash through it
Question
Computer circuitry consists of two-state on/off switches, often represented by 1 or 0.
Question
Most programming languages support a NOT operator, which reverses the meaning of a Boolean expression.
Question
A structure that includes separate actions when an expression is true and when it is false is called a(n) ____ structure.

A)dual-alternative selection
C)single-alternative selection
B)diverging selection
D)null-alternative selection
Question
An AND decision can be constructed using a ____ decision.

A)nested
C)combined
B)stacked
D)dual
Question
Usually, a comparison operator is used to compare values of different data types.
Question
Only a few decisions you make in a computer program involve evaluating a Boolean expression.
Question
When using the OR operator, an action is taken when at least one of the comparisons evaluates to true.
Question
The structure that takes one of two paths based on a decision is called a(n) ____ structure.

A)if-then
C)if-then-else
B)if-else
D)if-endif
Question
Most programming languages allow you to express "greater than or equal to" by typing ____.

A)>=
C)==<
B)<=
D)==>
Question
For greatest program efficiency when using the AND operator, first ask the question that is more likely to be true.
Question
The ____________________ operator evaluates to true when its operands are considered to have the same value.
Question
In a(n) ____________________ selection, action is required for only one outcome of a question.
Question
A common error when using range checking is creating a(n) ____ path in the code.

A)unreachable
C)parallel
B)ending
D)decision
Question
A structured selection must have one entry point at the decision, and ____ exit point(s) when the two logical paths rejoin.

A)one
C)three
B)two
D)four
Question
What is one common error in using an OR selection?

A)using AND logic when OR is needed
C)using too many comparison operators
B)creating structured logic
D)using too few comparison operators
Question
When structures are "on top of" each other, they are known as ____________________ structures.
Question
A(n) ____ decision is used when either one of two conditions must be met.

A)case
C)AND
B)if
D)OR
Question
You can use ____ statements instead of using AND and OR operators.

A)conditional
C)nesting loop
B)stacked if
D)nesting if
Question
Which takes precedence when the two are combined in a single statement: AND or OR?

A)OR
C)whichever comes first
B)AND
D)whichever comes last
Question
When you need to ask multiple questions before an outcome is determined, you must create a ____.

A)dual condition
C)large condition
B)compound condition
D)coordinated condition
Question
You should never ask a question if there is ____ possible answer(s) or outcome(s).

A)an unknown set of
C)two or fewer
B)a known set of
D)only one
Question
When you use one or more ____ operators to combine two or more Boolean expressions, each Boolean expression must be true for the entire expression to be evaluated as true.

A)AND
C)NOT
B)OR
D)EQUALS
Question
Many programming languages allow you to use ____ to force an expression to evaluate first.

A)a pound sign
C)parentheses
B)an asterisk
D)quotation marks
Question
____ are diagrams used in mathematics and logic to help describe the truth of an entire expression based on the truth of its parts.

A)Text tables
C)Results tables
B)Truth tables
D)Yes/No tables
Question
In an AND decision, why is it good practice to make the first question the one that is less likely to be true?

A)This eliminates all instances of the second decision.
B)This eliminates as many instances of the second decision as possible.
C)This eliminates evaluation of the first decision.
D)This makes program execution longer.
Question
A(n) ____ of values is any series of contiguous values that fall between specified limits.

A)group
C)range
B)assortment
D)set
Question
A dual-alternative selection is also known as a(n) ____________________ structure.
Question
The value of a(n) ____________________ expression can only be true or false.
Question
In pseudocode, the if, else, and endif statements should align ____.

A)diagonally
C)vertically
B)on the same horizontal line
D)horizontally
Question
A series of nested if statements can also be called a ____ if statement.

A)layered
C)stacked
B)cascading
D)dual
Question
In a(n) ____________________ decision, more than one condition must be true for an action to take place.
Question
An AND decision can be constructed using a nested ____________________.
Question
When you use a(n) ____________________ operator, only one of the conditions in an expression must be true for the resulting action to take place.
Question
You might say that a path that can never be traveled in a program is a(n) ____________________ path.
Question
____________________ are diagrams used in mathematics and logic to help describe the truth of an entire expression.
Question
In a(n) ____________________ condition, you ask multiple questions before an outcome is determined.
Question
To perform a(n) ____________________, make comparisons using either the lowest or highest value in each range of values.
Question
An expression in which two constants are compared is called a(n) ____________________ expression.
Question
In _______________ evaluation, the computer always skips the second comparison when using an AND operator if the first comparison is false.
Question
The order in which operators are evaluated in an expression is determined by ____________________.
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 3: Making Decisions
1
The selection structure can be called an if-then structure.
False
2
All modern programming languages support ____ types of relational comparison operators.

A)two
C)four
B)three
D)six
D
3
In pseudocode, a(n) ____ statement is used to clearly show where the selection structure ends.

A)end
C)endifelse
B)endif
D)stop
B
4
You can ask every programming question by using one of only four types of comparison operators in a Boolean expression.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
Besides being awkward to use, the "____" comparison operator is the one most likely to be different in various programming languages.

A)equal to
C)not equal to
B)greater than
D)less than
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
A(n) ____ expression is one that represents only one of two states, usually expressed as true or false.

A)alternative
C)Boolean
B)dual
D)double
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
When you combine AND and OR operators within the same statement, the AND operators take precedence.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
You use the ____ operator to reverse the meaning of a Boolean expression.

A)duplicate
C)logical NOT
B)reverse
D)unequal
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
For greatest program efficiency when using the OR operator, first ask the question that is more likely to be true.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
In a flowchart or in pseudocode, you can use the symbol that mathematicians use to mean "not equal," which is ____.

A)an equal sign with an octagon over it
C)an equal sign with a slash after it
B)an equal sign with a circle around it
D)an equal sign with a slash through it
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
Computer circuitry consists of two-state on/off switches, often represented by 1 or 0.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
Most programming languages support a NOT operator, which reverses the meaning of a Boolean expression.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
A structure that includes separate actions when an expression is true and when it is false is called a(n) ____ structure.

A)dual-alternative selection
C)single-alternative selection
B)diverging selection
D)null-alternative selection
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
An AND decision can be constructed using a ____ decision.

A)nested
C)combined
B)stacked
D)dual
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
Usually, a comparison operator is used to compare values of different data types.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
Only a few decisions you make in a computer program involve evaluating a Boolean expression.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
When using the OR operator, an action is taken when at least one of the comparisons evaluates to true.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
The structure that takes one of two paths based on a decision is called a(n) ____ structure.

A)if-then
C)if-then-else
B)if-else
D)if-endif
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
Most programming languages allow you to express "greater than or equal to" by typing ____.

A)>=
C)==<
B)<=
D)==>
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
For greatest program efficiency when using the AND operator, first ask the question that is more likely to be true.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
The ____________________ operator evaluates to true when its operands are considered to have the same value.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
In a(n) ____________________ selection, action is required for only one outcome of a question.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
A common error when using range checking is creating a(n) ____ path in the code.

A)unreachable
C)parallel
B)ending
D)decision
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
A structured selection must have one entry point at the decision, and ____ exit point(s) when the two logical paths rejoin.

A)one
C)three
B)two
D)four
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
What is one common error in using an OR selection?

A)using AND logic when OR is needed
C)using too many comparison operators
B)creating structured logic
D)using too few comparison operators
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
When structures are "on top of" each other, they are known as ____________________ structures.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
A(n) ____ decision is used when either one of two conditions must be met.

A)case
C)AND
B)if
D)OR
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
You can use ____ statements instead of using AND and OR operators.

A)conditional
C)nesting loop
B)stacked if
D)nesting if
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
Which takes precedence when the two are combined in a single statement: AND or OR?

A)OR
C)whichever comes first
B)AND
D)whichever comes last
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
When you need to ask multiple questions before an outcome is determined, you must create a ____.

A)dual condition
C)large condition
B)compound condition
D)coordinated condition
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
You should never ask a question if there is ____ possible answer(s) or outcome(s).

A)an unknown set of
C)two or fewer
B)a known set of
D)only one
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
When you use one or more ____ operators to combine two or more Boolean expressions, each Boolean expression must be true for the entire expression to be evaluated as true.

A)AND
C)NOT
B)OR
D)EQUALS
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
Many programming languages allow you to use ____ to force an expression to evaluate first.

A)a pound sign
C)parentheses
B)an asterisk
D)quotation marks
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
____ are diagrams used in mathematics and logic to help describe the truth of an entire expression based on the truth of its parts.

A)Text tables
C)Results tables
B)Truth tables
D)Yes/No tables
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
In an AND decision, why is it good practice to make the first question the one that is less likely to be true?

A)This eliminates all instances of the second decision.
B)This eliminates as many instances of the second decision as possible.
C)This eliminates evaluation of the first decision.
D)This makes program execution longer.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
A(n) ____ of values is any series of contiguous values that fall between specified limits.

A)group
C)range
B)assortment
D)set
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
A dual-alternative selection is also known as a(n) ____________________ structure.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
The value of a(n) ____________________ expression can only be true or false.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
In pseudocode, the if, else, and endif statements should align ____.

A)diagonally
C)vertically
B)on the same horizontal line
D)horizontally
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
A series of nested if statements can also be called a ____ if statement.

A)layered
C)stacked
B)cascading
D)dual
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
In a(n) ____________________ decision, more than one condition must be true for an action to take place.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
An AND decision can be constructed using a nested ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
When you use a(n) ____________________ operator, only one of the conditions in an expression must be true for the resulting action to take place.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
You might say that a path that can never be traveled in a program is a(n) ____________________ path.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
____________________ are diagrams used in mathematics and logic to help describe the truth of an entire expression.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
In a(n) ____________________ condition, you ask multiple questions before an outcome is determined.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
To perform a(n) ____________________, make comparisons using either the lowest or highest value in each range of values.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
An expression in which two constants are compared is called a(n) ____________________ expression.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
In _______________ evaluation, the computer always skips the second comparison when using an AND operator if the first comparison is false.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
The order in which operators are evaluated in an expression is determined by ____________________.
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.