Chapter 1 The instruction “If it is raining outside, then take an umbrella”

subject Type Homework Help
subject Pages 2
subject Words 334
subject Authors Diane Zak

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Chapter 1: I Am Not A Control Freak! (Control Structures)
TRUE/FALSE
1. All computer programs, no matter how simple or how complex, are written using one or more of three
basic structures: sequence, selection, and repetition.
2. Programmers must use the repetition structure in every program they write.
3. The selection structure is also referred to as the decision structure.
4. When used in a computer program, the selection structure alerts the computer that a decision needs to
be made, and it provides the appropriate action to take based on the result of that decision.
5. In a sequence structure a condition can evaluate to either true or false.
6. The redo structure is also referred to as a loop or as iteration.
7. Without the repetition structure, if you needed an instruction to repeat 20 times you would have to
write that instructions 20 times in your program.
MULTIPLE CHOICE
1. Control structures or ____ structures control the flow of a program’s logic.
a.
flow
c.
logic
b.
program
d.
execution
2. The ____ structure in a computer program directs the computer to process the program instructions,
one after another, in the order listed in the program.
a.
sequence
c.
repetition
b.
selection
d.
series
3. A(n) ____ is a set of step-by-step instructions that accomplish a task.
a.
program
c.
instruction set
b.
algorithm
d.
command structure
page-pf2
4. The ____ structure makes a decision and then takes an appropriate action based on that decision.
a.
repetition
c.
command
b.
sequence
d.
selection
5. The instruction “If it is raining outside, then take an umbrella” is an example of the ____ structure.
a.
control
c.
selection
b.
repetition
d.
sequence
6. When used in a program, the ____ structure directs the computer to repeat one or more instructions
until some condition is met, at which time the computer should stop repeating the instructions.
a.
redo
c.
selection
b.
repetition
d.
sequence
7. The instruction “Do homework problems until done” is an example of the ____ structure.
a.
control
c.
selection
b.
repetition
d.
sequence

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.