x
Info
x
Warning
x
Danger
 / 
 / 
 / 
Fluency with Information Technology, 5e (Snyder) Chapter 20:  Iteration Principles: Once

Question : Fluency with Information Technology, 5e (Snyder) Chapter 20:  Iteration Principles: Once : 1907258

Fluency with Information Technology, 5e (Snyder)

Chapter 20:  Iteration Principles: Once Is Not Enough

 

20.1   True/False

1) The control specification of the for loop includes three operations: <initialization>, <continuation>, and <next iteration>.

Answer:  TRUE

2) A for loop continues as long as the <continuation> test is true.

Answer:  TRUE

Explanation:  The <continuation> test tests to see if the loop should continue.

3) It is possible to set up a for loop that never iterates.

Answer:  TRUE

Explanation:  Depending on how it's set up, a loop might never run.

4) The starting point of a for loop is always 1.

Answer:  FALSE

Explanation:  The starting point for a for loop can be any number.

5) The step size of a for loop is always 1.

Answer:  FALSE

Explanation:  The step size can be any size and either positive or negative.

6) Loops cannot count backwards.

Answer:  FALSE

Explanation:  Loops can count backwards. It's called decrementing.

7) Iteration variables must be only single-letter identifiers.

Answer:  FALSE

Explanation:  They often are just one character long, mainly i, j, or k.

8) A fractional number can be used to as the starting point of a for loop.

Answer:  TRUE

9) The iteration variable is often used in computations in the <statement list>.

Answer:  TRUE

Explanation:  One of the best uses of the iteration variable is in the <statement list>.

10) The iteration variable of a for loop should never be changed by statements in the statement list of a loop.

Answer:  TRUE

Explanation:  The iteration variable of a for loop should change in a loop, but it shouldn't change in the statement list.

Solution
5 (1 Ratings )

Solved
English 2 Years Ago 383 Views
This Question has Been Answered!
Unlimited Access Free
Explore More than 2 Million+
  • Textbook Solutions
  • Flashcards
  • Homework Answers
  • Documents
Signup for Instant Access!
Ask an Expert
Our Experts can answer your tough homework and study questions
12971 English Questions Answered!
Post a Question