Chapter 4 Flashcards

1
Q

Boolean expressions can only be

A

True or False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

if-then-else decision is used for

what does the if-then expression holds

what does the else expression holds

A

selection structure

if-then holds the actions that execute when statement is true

else executes when condition is false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

relational comparison operators are the

A

equal sign (=)

greater than sign (>)

less than sign (<)

greater than or equal to sign (>=)

less than or equal to sign (<=)

not equal to sign (<>)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

trivial expressions

A

will evaluate same results

EX: 20=20

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

compound condition

A

ask multiple questions before outcome is determined

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

AND decision

A

requires both test to be true

requires a nested decision or a cascading if statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

instead of nesting decisions, you can use an

A

conditional AND statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

when nesting decisions, ask the question that

A

fails first

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Conditional AND operator

A

asks 2 or more questions in a decision statement

each boolean expression must be true for entire expression to be true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

truth table

A

diagrams that describe truth of an entire expression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

short circuit evaluation

A

expression evaluated only as far as necessary to determine truth

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Or decision

A

take action when one of the many conditions are true

Only one boolean expression must be true to produce a result of true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Not operator

A

reverses the meaning of a boolean expression (if not true, then its false/if not false, then its true)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

range check

A

compare a variable to a series of values between limits (an interval)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

if you want all conditions to be true, use what expression

A

the AND expression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly