Filters
Question type

Study Flashcards

The ____________________ clause is the part of the decision that holds the action or actions that execute when the tested condition in the decision is true.

Correct Answer

verifed

verified

Match each term with a statement below.

Premises
Will always evaluate to the same value
Responses
case structure
OR
else clause
a decision within another decision
AND
dead
=, >, =,
parentheses
trivial expressions
compound condition

Correct Answer

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

Match each term with a statement below.

Premises
Using this operator, an expression that tests a condition with two parts that must both evaluate to true for an action to take place
Responses
AND
OR
case structure
else clause
parentheses
dead
a decision within another decision
trivial expressions
compound condition
=, >, =,

Correct Answer

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

Match each term with a statement below.

Premises
Relational comparison operators
Responses
AND
a decision within another decision
OR
trivial expressions
=, >, =,
parentheses
else clause
dead
case structure
compound condition

Correct Answer

Relational comparison operators
=, >, =,

Match each term with a statement below.

Premises
When this operator is used, only one of the listed conditions must be met for the resulting action to take place
Responses
case structure
AND
parentheses
dead
trivial expressions
OR
a decision within another decision
=, >, =,
compound condition
else clause

Correct Answer

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

To avoid confusion, you can use ____statements instead of using AND and OR operators.


A) trivial
B) nested if
C) NOT
D) range check

E) All of the above
F) None of the above

Correct Answer

verifed

verified

You can perform a ____ by making comparisons using either the lowest or highest value in a range of values.


A) range check
B) nested if
C) logic check
D) trivial expression

E) None of the above
F) All of the above

Correct Answer

verifed

verified

When you ____________________ decisions because the resulting action requires that two conditions be true, you must decide which of the two decisions to make first.

Correct Answer

verifed

verified

Most programming languages allow you to ask two or more questions in a single comparison.

A) True
B) False

Correct Answer

verifed

verified

A ____________________ selection is one in which an action is associated with each of two possible outcomes.

Correct Answer

verifed

verified

dual-alter...

View Answer

When would you use a negative comparison?

Correct Answer

verifed

verified

Although negative comparisons can be awkward to use, your meaning is sometimes clearest when using them. Frequently, this occurs when you use an if without an else , taking action only when some comparison is false. An example would be:  if  customerZipCode LOCAL_ZIP_CODE then total = total + deliveryCharge endif

In a truth table, the expression ____ is false.


A) true OR true
B) true OR false
C) false OR true
D) false OR false

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

Correct Answer

verifed

verified

When you combine AND and OR operators, the OR operators take precedence, meaning their Boolean values are evaluated first.

A) True
B) False

Correct Answer

verifed

verified

False

A series of nested if statements is also called a ____ if statement.


A) stacked
B) cascading
C) indented
D) waterfall

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

Correct Answer

verifed

verified

You can use parentheses to override the default order of operations.

A) True
B) False

Correct Answer

verifed

verified

For maximum efficiency, a good rule of thumb in an AND 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 OR decision and ask the question more likely to be true
D) rewrite it as an OR decision and ask the question more likely to be false

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

Correct Answer

verifed

verified

Match each term with a statement below.

Premises
Part of a decision that executes only when the tested condition in the decision is false
Responses
=, >, =,
case structure
OR
compound condition
parentheses
else clause
trivial expressions
dead
AND
a decision within another decision

Correct Answer

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

Usually, ____ variables are not considered to be equal unless they are identical.


A) string
B) integer
C) character
D) floating point

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

Correct Answer

verifed

verified

A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to determine whether the entire expression is true or false.

A) True
B) False

Correct Answer

verifed

verified

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


A) single-alternative
B) Boolean
C) Unicode
D) dual

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

Correct Answer

verifed

verified

Showing 1 - 20 of 60

Related Exams

Show Answer