Chapter 8 Choice 1 The Structure Makes Decision And

subject Type Homework Help
subject Pages 4
subject Words 658
subject Authors Diane Zak

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Chapter 8: Decisions, Decisions, Decisions (Selection Structure)
TRUE/FALSE
1. Many times the next instruction processed depends on the result of a decision that must be made.
2. A programmer determines whether a problem’s solution requires a selection structure by studying the
problem specification.
3. The selection structure is referred to as a single-alternative selection structure because it requires one
or more actions to be taken only when its condition evaluates to true.
4. Selection structures that contain instructions in the true path and the false path are referred to as
double-alternative selection structures.
5. Items in square brackets are required in the syntax of an algorithm.
6. Comparison operators in Visual Basic do not have an order of precedence.
7. Arithmetic operators are evaluated after any comparison operators in an expression.
8. The oval in a flowchart is called the selection/repetition symbol.
9. The two flowlines leading out of a diamond should be marked so that anyone reading the flowchart
can distinguish the true path from the false path.
10. In Windows applications, check boxes provide one or more independent and nonexclusive items from
which the user can choose.
11. During run time, you can determine whether a check box is selected or unselected by looking at the
value in its Checked property.
page-pf2
12. Unlike the variables declared at the beginning of a procedure, variables declared within a statement
block in a selection structure remain in memory until the procedure ends.
13. Unlike variables declared at the beginning of a procedure, variables declared within a statement block
have block scope rather than procedure scope.
14. Although there is nothing wrong with declaring all variables at the beginning of a procedure, many
programmers would prefer to create a variable only if it is necessary to do so.
15. More unintentional errors occur in applications when the variables are declared using the minimum
scope needed.
MULTIPLE CHOICE
1. The ____ structure makes a decision and then takes an appropriate action based on that decision.
a.
loop
c.
selection
b.
condition
d.
case
2. In the If…Then…Else statement, the programmer must supply the ____ that the computer needs to
evaluate before further processing can occur.
a.
condition
c.
order
b.
execution
d.
path
3. In the If…Then…Else statement, the condition must be a(n) ____ expression.
a.
arithmetic
c.
constant
b.
conditional
d.
Boolean
4. The set of statements contained in the true path, as well as the set of statements contained in the false
path, is referred to as a(n) ____.
a.
statement block
c.
executable code block
b.
conditional block
d.
path block
5. Operators are called ____ operators because they are used to compare values.
a.
test
c.
change
b.
comparison
d.
binary
page-pf3
6. The instructions in the true path are processed only when the condition evaluates to ____.
a.
greater than
c.
equal to
b.
True
d.
False
7. The ____ in a flowchart is the start/stop symbol.
a.
parallelogram
c.
diamond
b.
rectangle
d.
oval
8. The ____ in a flowchart is the process symbol.
a.
parallelogram
c.
diamond
b.
rectangle
d.
oval
9. The ____ in a flowchart is the input/output symbol.
a.
parallelogram
c.
diamond
b.
rectangle
d.
oval
10. The ____ in a flowchart is called the decision symbol.
a.
parallelogram
c.
diamond
b.
rectangle
d.
oval
11. The Text property of a check box should be entered using ____.
a.
all lowercase letters
c.
sentence capitalization
b.
all uppercase letters
d.
book capitalization
12. In a flowchart, a(n) ____ represents the condition in a selection structure.
a.
parallelogram
c.
diamond
b.
rectangle
d.
oval
13. A variable that has ____ scope can be used anywhere within the procedure.
a.
global
c.
internal
b.
procedure
d.
block
14. A variable that has ____ scope can be used only within the statement block in which it is declared.
a.
global
c.
internal
b.
procedure
d.
block
15. A variable declared within a statement block is called a ____.
a.
block-level variable
c.
contained variable
page-pf4
b.
restricted variable
d.
simple variable

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.