Professional Documents
Culture Documents
Review Question
Multiple Choice
1. A _________ structure can execute a set of statements only under certain circumstances.
C. decision
2. A _________ structure provides one alternative path of execution.
B. single alternative decision
3. In pseudocode, the If-Then statement us an example of a _________.
B. decision structure
4. A (n) _________ expression has a value of either true or false.
D. Boolean
5. The symbols >, <, and == are all _________ operators.
A. relational
6. A (n) _________ structure tests a condition and then takes one path is the condition is true, or
another path if the condition is false.
C. Dual alternative decision
7. You use a (n) _________ statement in pseudocode to write a single alternative decision
structure.
B. If-Then
8. You use a (n) _________ statement in pseudocode to write a dual alternative decision structure.
C. If-Then-Else
9. A _________ structure allows you to test the value of a variable or an expression and then use
that value to determine which statement or set of statements to execute.
D. multiple alternative decision
10. A (n) _________ section of a Select Case statement is branched to if none of the case values
match the expression listed after the Select statement.
B. Default
11. AND, OR, and NOT are _________ operators.
B. logical
12. A compound Boolean expression created with the _________ operator is true only if both of its
subexpressions are true.
A. AND
13. A compound Boolean expression created with the _________ operator is true if either of its
subexpressions is true.
B. OR
14. The _________ operator takes a Boolean expression as its operand and reverses its logical value.
C. NOT
15. A _________ is a Boolean variable that signals when some condition exists in the program.
A. Fla
True or false
Short answer
1. Explain what is meant by the term “conditionally executed.”
An action is performed only when a certain condition is true
I will use the "If" statement because it is a dual alternative decision structure.
3. If you need to test the value of a variable and use value to determine That Which statement or
set of statements to execute, Which structure would be The most straightforward to use?
A nested decision structure would be the most straightforward to use. It tests the value of a
variable and uses that value to determine which statements or set of statement to execute
The case structure lets the value of an expression or variable determines which
execution path of the program will take.
4. Briefly describe how the AND operator works.
The AND operator connects two Boolean expressions into one compound expression. Both
subexpressions must the true for the compound expression to be true.
The AND operator takes two Boolean expressions as operands and Creates a
compound Boolean expression is True That Only When Both sub-expressions are
true. The following is an example of an If-Then statement uses the AND operator
that:
The OR operator connects two Boolean expressions into one compound expression. One or
both subexpressions must be true for the compound expression to be true. It is only necessary
for one of the subexpressions to be true, and it does not matter which.
6. When determining whether a number is inside a range, which logical operator is it best to
use?
And operator
The AND operator would be the best to use to determine whether or not a number
is Within a Given Range.
7. What is a flag and how does it work?
A flag is a Boolean variable signals That When some condition exists in the program.
When the flag is September to False, it Indicates the condition does not exist. When
the flag is September Variable to True, It Means the condition does exist.
8. Isaac
9. Anaza
10. Gas
11. Ty
Chapter 5
Multiple Choice
1. A _____-controlled loop uses a true/false condition to control the number of times that it
repeats
B. condition
2. A _____-controlled loop repeats a specific number of times.
D. count
3. Each repetition of a loop is known as a(n) _____.
D. iteration
4. The while loop is a _____ type of loop.
A. pretest
5.
6. Mn
7. M
8. M
9. M
10. M
11. ,
12. ,
13. ,
14. ,
15. .
16. ,
17. ,