Deck 13: Do It, Then Ask Permission Posttest Loops

Full screen (f)
exit full mode
Question
____ loops should be used only when their instructions must be processed at least once.

A) Posttest
C) DoAfter
B) Pretest
D) ProcessAfter
Use Space or
up arrow
down arrow
to flip the card.
Question
In the posttest syntax, the condition is evaluated before the loop instructions are processed.
Question
In the pretest syntax, the condition is evaluated after the loop instructions are processed.
Question
The ____ loop condition is evaluated after the instructions within the loop are processed.

A) posttest
C) before
B) pretest
D) after
Question
In the ____ loop, the condition appears in the last line.

A) sequential
C) posttest
B) pretest
D) iterative
Question
The instructions in a pretest loop will be processed at least once.
Question
The instructions in a posttest loop ____.

A) may never be processed
C) always will be processed at least twice
B) should only be processed once
D) always will be processed at least once
Question
In the pretest syntax for a Do…Loop statement, the {While | Until} condition section is part of the ____ clause.

A) Execute
C) Do
B) Process
D) Loop
Question
Pretest loops should be used only when their instructions must be processed at least once.
Question
A pretest loop is easier to write and understand than a posttest loop with a selection structure.
Question
In the ____ loop, the condition appears in the first line.

A) sequential
C) posttest
B) pretest
D) iterative
Question
Most programmers use posttest loops.
Question
A repetition structure can be either a pretest loop or a posttest loop.
Question
The ____ loop condition is evaluated before the instructions within the loop are processed.

A) posttest
C) before
B) pretest
D) after
Question
In the posttest syntax for a Do…Loop, the {While | Until} condition section is part of the ____ clause.

A) Execute
C) Do
B) Process
D) Loop
Question
The Do…Loop statement can be used to code a pretest loop as well as a posttest loop.
Question
When a posttest loop is placed in a selection structure, the loop will be processed only when the selection structure's condition evaluates to True.
Question
The diamond that represents the condition appears at the top of the loop in the flowchart of a posttest loop.
Question
The difference between pretest and posttest loops pertains to how the accumulator is evaluated.
Question
In the posttest syntax, the only purpose of the Do clause is to mark the beginning of the loop.
Question
You may test an initial condition of a posttest loop by ____.

A) using a nested loop for the initial condition
B) placing the posttest loop inside a selection structure
C) resetting the counter variable on each pass of the loop
D) initializing all loop variables to zero
Question
One problem with posttest loops is that they always execute at least once. You can fix the problem in the Posttest Loop button's code by placing the posttest loop in a(n) ____ structure.

A) selection
C) iterative
B) execute
D) another posttest loop
Question
You are given the following statement: Do ... Loop Until intCounter > intNumTimes.
The Until intCounter > intNumTimes represents a _____.

A) loop condition
C) loop full condition
B) loop exit condition
D) loop retreat condition
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/23
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 13: Do It, Then Ask Permission Posttest Loops
1
____ loops should be used only when their instructions must be processed at least once.

A) Posttest
C) DoAfter
B) Pretest
D) ProcessAfter
A
2
In the posttest syntax, the condition is evaluated before the loop instructions are processed.
False
3
In the pretest syntax, the condition is evaluated after the loop instructions are processed.
False
4
The ____ loop condition is evaluated after the instructions within the loop are processed.

A) posttest
C) before
B) pretest
D) after
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
5
In the ____ loop, the condition appears in the last line.

A) sequential
C) posttest
B) pretest
D) iterative
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
6
The instructions in a pretest loop will be processed at least once.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
7
The instructions in a posttest loop ____.

A) may never be processed
C) always will be processed at least twice
B) should only be processed once
D) always will be processed at least once
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
8
In the pretest syntax for a Do…Loop statement, the {While | Until} condition section is part of the ____ clause.

A) Execute
C) Do
B) Process
D) Loop
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
9
Pretest loops should be used only when their instructions must be processed at least once.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
10
A pretest loop is easier to write and understand than a posttest loop with a selection structure.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
11
In the ____ loop, the condition appears in the first line.

A) sequential
C) posttest
B) pretest
D) iterative
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
12
Most programmers use posttest loops.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
13
A repetition structure can be either a pretest loop or a posttest loop.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
14
The ____ loop condition is evaluated before the instructions within the loop are processed.

A) posttest
C) before
B) pretest
D) after
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
15
In the posttest syntax for a Do…Loop, the {While | Until} condition section is part of the ____ clause.

A) Execute
C) Do
B) Process
D) Loop
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
16
The Do…Loop statement can be used to code a pretest loop as well as a posttest loop.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
17
When a posttest loop is placed in a selection structure, the loop will be processed only when the selection structure's condition evaluates to True.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
18
The diamond that represents the condition appears at the top of the loop in the flowchart of a posttest loop.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
19
The difference between pretest and posttest loops pertains to how the accumulator is evaluated.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
20
In the posttest syntax, the only purpose of the Do clause is to mark the beginning of the loop.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
21
You may test an initial condition of a posttest loop by ____.

A) using a nested loop for the initial condition
B) placing the posttest loop inside a selection structure
C) resetting the counter variable on each pass of the loop
D) initializing all loop variables to zero
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
22
One problem with posttest loops is that they always execute at least once. You can fix the problem in the Posttest Loop button's code by placing the posttest loop in a(n) ____ structure.

A) selection
C) iterative
B) execute
D) another posttest loop
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
23
You are given the following statement: Do ... Loop Until intCounter > intNumTimes.
The Until intCounter > intNumTimes represents a _____.

A) loop condition
C) loop full condition
B) loop exit condition
D) loop retreat condition
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 23 flashcards in this deck.