Filters
Question type

Study Flashcards

You use theΒ  ____ operator to reverse the meaning of a Boolean expression.


A) AND
B) XOR
C) OR
D) NOT

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

Correct Answer

verifed

verified

How can you improve the efficiency of a nested decision?

Correct Answer

verifed

verified

When you nest two decisions, you must ch...

View Answer

Most programming languages allow you to ask two or more questions in a single comparison by using a(n) ____ operator that joins decisions in a single statement.


A) AND
B) OR
C) IF
D) XOR

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

Correct Answer

verifed

verified

When you ask multiple questions before an outcome is determined, you create a ____ condition.


A) dual-alternative
B) nested
C) single-alternative
D) compound

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

Correct Answer

verifed

verified

In an OR decision, why is it more efficient to first ask the question that is more likely to be true?

Correct Answer

verifed

verified

The general rule is: In an OR decision, ...

View Answer

For maximum efficiency, a good rule of thumb in an OR decision is to ____.


A) first ask the question that is more likely to be true
B) first ask the question that is more likely to be false
C) rewrite it as an AND decision and ask the question more likely to be true
D) rewrite it as an AND decision and ask the question more likely to be false

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

Correct Answer

verifed

verified

How can you avoid common errors in an AND selection?

Correct Answer

verifed

verified

You can do these three things to avoid c...

View Answer

How can you avoid common errors in an OR selection?

Correct Answer

verifed

verified

You can do these four things to avoid co...

View Answer

You use the case structure only when a series of decisions is based on a single expression.

A) True
B) False

Correct Answer

verifed

verified

You can use ____ for clarity and to override the default order of operations.


A) parentheses
B) truth tables
C) multiplication
D) NOT

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

Correct Answer

verifed

verified

Match each term with a statement below.

Premises
Used when there are several distinct possible values for a single variable, and each value requires a different subsequent action
Responses
trivial expressions
=, >, =,
dead
parentheses
AND
case structure
a decision within another decision
else clause
OR
compound condition

Correct Answer

trivial expressions
=, >, =,
dead
parentheses
AND
case structure
a decision within another decision
else clause
OR
compound condition

Any decision can be made using combinations of just two types of comparisons: equal and not equal.

A) True
B) False

Correct Answer

verifed

verified

____ are diagrams used in mathematics and logic to help describe the truth of an entire expression based on the truth of its parts.


A) Decision matrices
B) Decision diagrams
C) Truth diagrams
D) Truth tables

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

Correct Answer

verifed

verified

The conditional AND operator in Java, C++, and C# is ____.


A) &
B) AND
C) **
D) &&

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

Correct Answer

verifed

verified

List the three types of comparisons that enable the making of any decision.

Correct Answer

verifed

verified

Any decision can be made using...

View Answer

C#, C++, C, and Java use the symbol ____ as the logical OR operator.


A) %
B) $
C) ||
D) ^

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

Correct Answer

verifed

verified

In any comparison, the two values compared can be either variables or constants.

A) True
B) False

Correct Answer

verifed

verified

Match each term with a statement below.

Premises
Used to override the default order of operations
Responses
else clause
=, >, =,
AND
case structure
dead
compound condition
trivial expressions
a decision within another decision
OR
parentheses

Correct Answer

else clause
=, >, =,
AND
case structure
dead
compound condition
trivial expressions
a decision within another decision
OR
parentheses

The NOT operator is a ____________________ operator, meaning it takes only one operand.

Correct Answer

verifed

verified

Most programming languages limit the number of AND and OR operators in an expression.

A) True
B) False

Correct Answer

verifed

verified

Showing 21 - 40 of 60

Related Exams

Show Answer