Filters
Question type

Study Flashcards

The selection structure can be called an if-then structure.

A) True
B) False

Correct Answer

verifed

verified

You can ask every programming question by using one of only four types of comparison operators in a Boolean expression.

A) True
B) False

Correct Answer

verifed

verified

In a(n) ____________________ selection, action is required for only one outcome of a question.

Correct Answer

verifed

verified

single-alt...

View Answer

An AND decision can be constructed using a nested ____________________.

Correct Answer

verifed

verified

decision
i...

View Answer

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
B) OR
C) NOT
D) EQUALS

E) B) and C)
F) A) and B)

Correct Answer

verifed

verified

A

____________________ are diagrams used in mathematics and logic to help describe the truth of an entire expression.

Correct Answer

verifed

verified

Truth tabl...

View Answer

The value of a(n) ____________________ expression can only be true or false.

Correct Answer

verifed

verified

Most programming languages allow you to express "greater than or equal to" by typing ____.


A) >=
B) <=
C) ==<
D) ==>

E) All of the above
F) B) and C)

Correct Answer

verifed

verified

The structure that takes one of two paths based on a decision is called a(n) ____ structure.


A) if-then
B) if-else
C) if-then-else
D) if-endif

E) B) and D)
F) C) and D)

Correct Answer

verifed

verified

In pseudocode, the if, else, and endif statements should align ____.


A) diagonally
B) on the same horizontal line
C) vertically
D) horizontally

E) A) and D)
F) C) and D)

Correct Answer

verifed

verified

A(n) ____ expression is one that represents only one of two states, usually expressed as true or false.


A) alternative
B) dual
C) Boolean
D) double

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

Besides being awkward to use, the "____" comparison operator is the one most likely to be different in various programming languages.


A) equal to
B) greater than
C) not equal to
D) less than

E) B) and C)
F) All of the above

Correct Answer

verifed

verified

What is one common error in using an OR selection?


A) using AND logic when OR is needed
B) creating structured logic
C) using too many comparison operators
D) using too few comparison operators

E) B) and C)
F) A) and C)

Correct Answer

verifed

verified

A

A structured selection must have one entry point at the decision, and ____ exit point(s) when the two logical paths rejoin.


A) one
B) two
C) three
D) four

E) All of the above
F) A) and D)

Correct Answer

verifed

verified

All modern programming languages support ____ types of relational comparison operators.


A) two
B) three
C) four
D) six

E) B) and D)
F) C) and D)

Correct Answer

verifed

verified

A(n) ____ decision is used when either one of two conditions must be met.


A) case
B) if
C) AND
D) OR

E) A) and B)
F) None of the above

Correct Answer

verifed

verified

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.

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

In pseudocode, a(n) ____ statement is used to clearly show where the selection structure ends.


A) end
B) endif
C) endifelse
D) stop

E) C) and D)
F) B) and D)

Correct Answer

verifed

verified

For greatest program efficiency when using the AND operator, first ask the question that is more likely to be true.

A) True
B) False

Correct Answer

verifed

verified

False

Many programming languages allow you to use ____ to force an expression to evaluate first.


A) a pound sign
B) an asterisk
C) parentheses
D) quotation marks

E) C) and D)
F) B) and C)

Correct Answer

verifed

verified

Showing 1 - 20 of 50

Related Exams

Show Answer