Logic ch 4 Flashcards

1
Q

Which of the following is a logical operator?

A

AND, NOT, OR (all of the above)

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

Which operator reverses the logic of its operand?

A

NOT

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

Pseudocode could be logically incorrect if not properly indented.

A

F

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

the____ operator is used to determine whether the operands are exactly the same as each other.

A

==

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

The If-Then-Else statement can be used to simplify a complex nested decision structure

A

F

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

In languages such as Java, Python, C, and C++, the ______ operator determines whether a variable is equal to another variable

A

==

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

The If-Then-Else statement should be used to write a single alternative decision structure

A

F

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

The ________ operator is a unary operator, as it works with only one operand.

A

NOT

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

A nested decision structure can achieve the same logic as a case structure

A

T

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

Which operator is used to determine that the operands are not exactly of the same value?

A

none of these. it is !=

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

which structure is a logical design that controls the order in which a set of statements executes?

A

control

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

The computer uses the ______ codes to accomplish string comparison

A

ASCII

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

The ______ statement is commonly used on programming languages for case structure.

A

Select Case

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

Although the sequence structure is heavily used in programming, it cannot handle every type of task.

A

T

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

The __________ decision structure provides only one alternative path of execution

A

the single alternative decision structure

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

The ____ operator could be used to simplify nested selection structures

A

AND

16
Q

A nested decision structure can be used to test more than one condition.

A

T

17
Q

When a program performs actions only under certain conditions, it is using a ______ structure

A

decision

18
Q

In an If-Then-Else statement, the Else clause marks the beginning of the statements to be executed when the Boolean expression is

A

false

19
Q

In an expression with an OR operator, it does not matter which sub expression is true for the compound expression to be true.

A

T

20
Q

the short-circuit evaluation is performed with expressions containing any logical operators

A

F

21
Q

The value of the ____ is compared with the values that follow each of the Case statements when a Select Case statement executes.

A

TestExpression

22
Q

The _____ symbol indicates that some condition must be tested in a flowchart.

A

diamond

23
Q

An If statement will produce unpredictable results if the programmer does not use proper indentations in pseudocode.

A

F. but it is common practice to include proper indentation