Logic ch 4 Flashcards
(24 cards)
Which of the following is a logical operator?
AND, NOT, OR (all of the above)
Which operator reverses the logic of its operand?
NOT
Pseudocode could be logically incorrect if not properly indented.
F
the____ operator is used to determine whether the operands are exactly the same as each other.
==
The If-Then-Else statement can be used to simplify a complex nested decision structure
F
In languages such as Java, Python, C, and C++, the ______ operator determines whether a variable is equal to another variable
==
The If-Then-Else statement should be used to write a single alternative decision structure
F
The ________ operator is a unary operator, as it works with only one operand.
NOT
A nested decision structure can achieve the same logic as a case structure
T
Which operator is used to determine that the operands are not exactly of the same value?
none of these. it is !=
which structure is a logical design that controls the order in which a set of statements executes?
control
The computer uses the ______ codes to accomplish string comparison
ASCII
The ______ statement is commonly used on programming languages for case structure.
Select Case
Although the sequence structure is heavily used in programming, it cannot handle every type of task.
T
The __________ decision structure provides only one alternative path of execution
the single alternative decision structure
The ____ operator could be used to simplify nested selection structures
AND
A nested decision structure can be used to test more than one condition.
T
When a program performs actions only under certain conditions, it is using a ______ structure
decision
In an If-Then-Else statement, the Else clause marks the beginning of the statements to be executed when the Boolean expression is
false
In an expression with an OR operator, it does not matter which sub expression is true for the compound expression to be true.
T
the short-circuit evaluation is performed with expressions containing any logical operators
F
The value of the ____ is compared with the values that follow each of the Case statements when a Select Case statement executes.
TestExpression
The _____ symbol indicates that some condition must be tested in a flowchart.
diamond
An If statement will produce unpredictable results if the programmer does not use proper indentations in pseudocode.
F. but it is common practice to include proper indentation