Deck 7: Repeating Program Instructions

Full screen (f)
exit full mode
Question
A(n) ____ is a numeric variable used for counting something.

A) collector
B) counter
C) selector
D) initializer
Use Space or
up arrow
down arrow
to flip the card.
Question
The Do ... Loop statement can be used to code both a pretest loop and a posttest loop.
Question
The InputBox function returns a ____.

A) variable
B) number
C) boolean value
D) string
Question
The ____ function displays an input dialog box, which is one of the standard dialog boxes available in Visual Basic.

A) InputBox
B) DialogBox
C) OutputBox
D) ShowBox
Question
You can use the procedures associated with the list box's SelectedValueChanged and SelectedIndexChanged events to perform one or more tasks when the selected item has changed.
Question
The repetition structure is used when a programmer needs the computer to repeatedly process one or more program instructions until some condition is met.
Question
The ____ indicates when to continue an action.

A) if condition
B) loop exit statement
C) loop determinant
D) loop condition
Question
____ means to assign a beginning value to the counter or accumulator.

A) Imprinting
B) Baselining
C) Selecting
D) Initializing
Question
In a(n) ____ loop, the condition is evaluated after the instructions within the loop are processed.

A) finite
B) infinite
C) pretest
D) posttest
Question
The loop's condition in a flowchart is represented by the decision symbol, which is a ____.

A) diamond
B) circle
C) square
D) triangle
Question
In most cases, counters and accumulators are initialized to ____.

A) a random number
B) a predetermined maximum
C) zero
D) one
Question
The instructions in the pretest and posttest loops will always be processed at least once.
Question
A(n) ____ is a numeric variable used for adding together something.

A) collector
B) counter
C) accumulator
D) initializer
Question
Incrementing or decrementing the value stored in the counter or accumulator is also referred to as ____.

A) imprinting
B) updating
C) baselining
D) initializing
Question
When using the InputBox function, you should use ____ for the prompt.

A) sentence capitalization
B) all uppercase letters
C) book capitalization
D) all lowercase letters
Question
If a list box allows the user to make only one selection, Windows applications automatically have the last list box item already selected when the interface appears.
Question
The value returned by the InputBox function depends on ____.

A) the default settings
B) the mode the program is in
C) the input area
D) the button the user chooses
Question
In a(n) ____ loop, the condition is evaluated before the instructions within the loop are processed.

A) finite
B) infinite
C) pretest
D) posttest
Question
____ means adding a number to the value stored in the counter or accumulator.

A) Imprinting
B) Updating
C) Baselining
D) Initializing
Question
The repetition structure is also referred to as a(n) ____.

A) loop
B) extension
C) block
D) case
Question
The number of choices the user can select in a list box is controlled by the list box's ____ property.

A) SelectionItem
B) SelectionMode
C) SelectionVariable
D) Selection
Question
A ____ box displays a list of items from which the user can select zero items, one item, or multiple items.

A) screen
B) message
C) list
D) refresh
Question
Describe the similarities and differences between a pretest loop and a posttest loop.
Question
What is customary in Windows applications that allow a user to make only one selection from a list box?
Question
You can use the ____________________ statement to exit the Do...Loop statement before the loop has finished processing.
Question
What two list box properties can be used to determine the item selected in the list box and to select a list box item from code?
Question
The ____________________ list box item is the item already selected when the interface appears.
Question
When adding items to a list box, describe how the items in the Items collection for a list box appear.
Question
A form's ____________________ event occurs when an application is started.
Question
The ____________________ function displays an input dialog box, which is one of the standard dialog boxes available in Visual Basic.
Question
Describe how the positions of list box items is determined.
Question
In most cases, you enter a list box's Add methods in the form's ____ event procedure.

A) Enter
B) Update
C) Add
D) Load
Question
When accessing items in a list box, the first item in the collection has an index of ____.

A) -1
B) 0
C) 1
D) null
Question
You can use the ____________________ property to determine whether an item is selected in a list box.
Question
How should a list box be sized to display the items it contains?
Question
The position of the items stored in a list box depends on the value stored in the list box's ____ property.

A) Count
B) Sorted
C) SelectedItem
D) SelectedIndex
Question
How do you enable and disable a control?
Question
Explain the syntax and use of the Refresh method.
Question
Each time either the user or a statement selects an item in a list box, the list box's ____ event occurs followed by its SelectedIndexChanged event.

A) SelectedItemChanged
B) SelectedValueChanged
C) ChosenValueChanged
D) ChosenItemChanged
Question
Describe how you determine the number of items in a list box.
Question
Match between columns
A group of individual objects treated as one unit.
loop exit condition
A group of individual objects treated as one unit.
looping condition
A group of individual objects treated as one unit.
infinite
A group of individual objects treated as one unit.
pretest
A group of individual objects treated as one unit.
posttest
A group of individual objects treated as one unit.
update read
A group of individual objects treated as one unit.
String Collection Editor window
A group of individual objects treated as one unit.
collection
A group of individual objects treated as one unit.
index
A loop that evaluates the condition before the instructions within the loop are processed.
loop exit condition
A loop that evaluates the condition before the instructions within the loop are processed.
looping condition
A loop that evaluates the condition before the instructions within the loop are processed.
infinite
A loop that evaluates the condition before the instructions within the loop are processed.
pretest
A loop that evaluates the condition before the instructions within the loop are processed.
posttest
A loop that evaluates the condition before the instructions within the loop are processed.
update read
A loop that evaluates the condition before the instructions within the loop are processed.
String Collection Editor window
A loop that evaluates the condition before the instructions within the loop are processed.
collection
A loop that evaluates the condition before the instructions within the loop are processed.
index
Used to specify the list box items during design time.
loop exit condition
Used to specify the list box items during design time.
looping condition
Used to specify the list box items during design time.
infinite
Used to specify the list box items during design time.
pretest
Used to specify the list box items during design time.
posttest
Used to specify the list box items during design time.
update read
Used to specify the list box items during design time.
String Collection Editor window
Used to specify the list box items during design time.
collection
Used to specify the list box items during design time.
index
A loop that evaluates the condition after the instructions within the loop are processed.
loop exit condition
A loop that evaluates the condition after the instructions within the loop are processed.
looping condition
A loop that evaluates the condition after the instructions within the loop are processed.
infinite
A loop that evaluates the condition after the instructions within the loop are processed.
pretest
A loop that evaluates the condition after the instructions within the loop are processed.
posttest
A loop that evaluates the condition after the instructions within the loop are processed.
update read
A loop that evaluates the condition after the instructions within the loop are processed.
String Collection Editor window
A loop that evaluates the condition after the instructions within the loop are processed.
collection
A loop that evaluates the condition after the instructions within the loop are processed.
index
Allows the user to update the value of the input item that controls the loop's condition.
loop exit condition
Allows the user to update the value of the input item that controls the loop's condition.
looping condition
Allows the user to update the value of the input item that controls the loop's condition.
infinite
Allows the user to update the value of the input item that controls the loop's condition.
pretest
Allows the user to update the value of the input item that controls the loop's condition.
posttest
Allows the user to update the value of the input item that controls the loop's condition.
update read
Allows the user to update the value of the input item that controls the loop's condition.
String Collection Editor window
Allows the user to update the value of the input item that controls the loop's condition.
collection
Allows the user to update the value of the input item that controls the loop's condition.
index
The requirement for not repeating the instructions of a loop.
loop exit condition
The requirement for not repeating the instructions of a loop.
looping condition
The requirement for not repeating the instructions of a loop.
infinite
The requirement for not repeating the instructions of a loop.
pretest
The requirement for not repeating the instructions of a loop.
posttest
The requirement for not repeating the instructions of a loop.
update read
The requirement for not repeating the instructions of a loop.
String Collection Editor window
The requirement for not repeating the instructions of a loop.
collection
The requirement for not repeating the instructions of a loop.
index
A loop that has no way to end.
loop exit condition
A loop that has no way to end.
looping condition
A loop that has no way to end.
infinite
A loop that has no way to end.
pretest
A loop that has no way to end.
posttest
A loop that has no way to end.
update read
A loop that has no way to end.
String Collection Editor window
A loop that has no way to end.
collection
A loop that has no way to end.
index
A unique number identifying each item in a list box's Items collection.
loop exit condition
A unique number identifying each item in a list box's Items collection.
looping condition
A unique number identifying each item in a list box's Items collection.
infinite
A unique number identifying each item in a list box's Items collection.
pretest
A unique number identifying each item in a list box's Items collection.
posttest
A unique number identifying each item in a list box's Items collection.
update read
A unique number identifying each item in a list box's Items collection.
String Collection Editor window
A unique number identifying each item in a list box's Items collection.
collection
A unique number identifying each item in a list box's Items collection.
index
The requirement for repeating the instructions of a loop.
loop exit condition
The requirement for repeating the instructions of a loop.
looping condition
The requirement for repeating the instructions of a loop.
infinite
The requirement for repeating the instructions of a loop.
pretest
The requirement for repeating the instructions of a loop.
posttest
The requirement for repeating the instructions of a loop.
update read
The requirement for repeating the instructions of a loop.
String Collection Editor window
The requirement for repeating the instructions of a loop.
collection
The requirement for repeating the instructions of a loop.
index
Question
Which method can you use to delay program execution? What is the syntax of the method?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/42
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 7: Repeating Program Instructions
1
A(n) ____ is a numeric variable used for counting something.

A) collector
B) counter
C) selector
D) initializer
B
2
The Do ... Loop statement can be used to code both a pretest loop and a posttest loop.
True
3
The InputBox function returns a ____.

A) variable
B) number
C) boolean value
D) string
D
4
The ____ function displays an input dialog box, which is one of the standard dialog boxes available in Visual Basic.

A) InputBox
B) DialogBox
C) OutputBox
D) ShowBox
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
5
You can use the procedures associated with the list box's SelectedValueChanged and SelectedIndexChanged events to perform one or more tasks when the selected item has changed.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
6
The repetition structure is used when a programmer needs the computer to repeatedly process one or more program instructions until some condition is met.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
7
The ____ indicates when to continue an action.

A) if condition
B) loop exit statement
C) loop determinant
D) loop condition
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
8
____ means to assign a beginning value to the counter or accumulator.

A) Imprinting
B) Baselining
C) Selecting
D) Initializing
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
9
In a(n) ____ loop, the condition is evaluated after the instructions within the loop are processed.

A) finite
B) infinite
C) pretest
D) posttest
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
10
The loop's condition in a flowchart is represented by the decision symbol, which is a ____.

A) diamond
B) circle
C) square
D) triangle
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
11
In most cases, counters and accumulators are initialized to ____.

A) a random number
B) a predetermined maximum
C) zero
D) one
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
12
The instructions in the pretest and posttest loops will always be processed at least once.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
13
A(n) ____ is a numeric variable used for adding together something.

A) collector
B) counter
C) accumulator
D) initializer
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
14
Incrementing or decrementing the value stored in the counter or accumulator is also referred to as ____.

A) imprinting
B) updating
C) baselining
D) initializing
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
15
When using the InputBox function, you should use ____ for the prompt.

A) sentence capitalization
B) all uppercase letters
C) book capitalization
D) all lowercase letters
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
16
If a list box allows the user to make only one selection, Windows applications automatically have the last list box item already selected when the interface appears.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
17
The value returned by the InputBox function depends on ____.

A) the default settings
B) the mode the program is in
C) the input area
D) the button the user chooses
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
18
In a(n) ____ loop, the condition is evaluated before the instructions within the loop are processed.

A) finite
B) infinite
C) pretest
D) posttest
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
19
____ means adding a number to the value stored in the counter or accumulator.

A) Imprinting
B) Updating
C) Baselining
D) Initializing
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
20
The repetition structure is also referred to as a(n) ____.

A) loop
B) extension
C) block
D) case
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
21
The number of choices the user can select in a list box is controlled by the list box's ____ property.

A) SelectionItem
B) SelectionMode
C) SelectionVariable
D) Selection
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
22
A ____ box displays a list of items from which the user can select zero items, one item, or multiple items.

A) screen
B) message
C) list
D) refresh
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
23
Describe the similarities and differences between a pretest loop and a posttest loop.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
24
What is customary in Windows applications that allow a user to make only one selection from a list box?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
25
You can use the ____________________ statement to exit the Do...Loop statement before the loop has finished processing.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
26
What two list box properties can be used to determine the item selected in the list box and to select a list box item from code?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
27
The ____________________ list box item is the item already selected when the interface appears.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
28
When adding items to a list box, describe how the items in the Items collection for a list box appear.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
29
A form's ____________________ event occurs when an application is started.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
30
The ____________________ function displays an input dialog box, which is one of the standard dialog boxes available in Visual Basic.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
31
Describe how the positions of list box items is determined.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
32
In most cases, you enter a list box's Add methods in the form's ____ event procedure.

A) Enter
B) Update
C) Add
D) Load
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
33
When accessing items in a list box, the first item in the collection has an index of ____.

A) -1
B) 0
C) 1
D) null
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
34
You can use the ____________________ property to determine whether an item is selected in a list box.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
35
How should a list box be sized to display the items it contains?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
36
The position of the items stored in a list box depends on the value stored in the list box's ____ property.

A) Count
B) Sorted
C) SelectedItem
D) SelectedIndex
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
37
How do you enable and disable a control?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
38
Explain the syntax and use of the Refresh method.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
39
Each time either the user or a statement selects an item in a list box, the list box's ____ event occurs followed by its SelectedIndexChanged event.

A) SelectedItemChanged
B) SelectedValueChanged
C) ChosenValueChanged
D) ChosenItemChanged
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
40
Describe how you determine the number of items in a list box.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
41
Match between columns
A group of individual objects treated as one unit.
loop exit condition
A group of individual objects treated as one unit.
looping condition
A group of individual objects treated as one unit.
infinite
A group of individual objects treated as one unit.
pretest
A group of individual objects treated as one unit.
posttest
A group of individual objects treated as one unit.
update read
A group of individual objects treated as one unit.
String Collection Editor window
A group of individual objects treated as one unit.
collection
A group of individual objects treated as one unit.
index
A loop that evaluates the condition before the instructions within the loop are processed.
loop exit condition
A loop that evaluates the condition before the instructions within the loop are processed.
looping condition
A loop that evaluates the condition before the instructions within the loop are processed.
infinite
A loop that evaluates the condition before the instructions within the loop are processed.
pretest
A loop that evaluates the condition before the instructions within the loop are processed.
posttest
A loop that evaluates the condition before the instructions within the loop are processed.
update read
A loop that evaluates the condition before the instructions within the loop are processed.
String Collection Editor window
A loop that evaluates the condition before the instructions within the loop are processed.
collection
A loop that evaluates the condition before the instructions within the loop are processed.
index
Used to specify the list box items during design time.
loop exit condition
Used to specify the list box items during design time.
looping condition
Used to specify the list box items during design time.
infinite
Used to specify the list box items during design time.
pretest
Used to specify the list box items during design time.
posttest
Used to specify the list box items during design time.
update read
Used to specify the list box items during design time.
String Collection Editor window
Used to specify the list box items during design time.
collection
Used to specify the list box items during design time.
index
A loop that evaluates the condition after the instructions within the loop are processed.
loop exit condition
A loop that evaluates the condition after the instructions within the loop are processed.
looping condition
A loop that evaluates the condition after the instructions within the loop are processed.
infinite
A loop that evaluates the condition after the instructions within the loop are processed.
pretest
A loop that evaluates the condition after the instructions within the loop are processed.
posttest
A loop that evaluates the condition after the instructions within the loop are processed.
update read
A loop that evaluates the condition after the instructions within the loop are processed.
String Collection Editor window
A loop that evaluates the condition after the instructions within the loop are processed.
collection
A loop that evaluates the condition after the instructions within the loop are processed.
index
Allows the user to update the value of the input item that controls the loop's condition.
loop exit condition
Allows the user to update the value of the input item that controls the loop's condition.
looping condition
Allows the user to update the value of the input item that controls the loop's condition.
infinite
Allows the user to update the value of the input item that controls the loop's condition.
pretest
Allows the user to update the value of the input item that controls the loop's condition.
posttest
Allows the user to update the value of the input item that controls the loop's condition.
update read
Allows the user to update the value of the input item that controls the loop's condition.
String Collection Editor window
Allows the user to update the value of the input item that controls the loop's condition.
collection
Allows the user to update the value of the input item that controls the loop's condition.
index
The requirement for not repeating the instructions of a loop.
loop exit condition
The requirement for not repeating the instructions of a loop.
looping condition
The requirement for not repeating the instructions of a loop.
infinite
The requirement for not repeating the instructions of a loop.
pretest
The requirement for not repeating the instructions of a loop.
posttest
The requirement for not repeating the instructions of a loop.
update read
The requirement for not repeating the instructions of a loop.
String Collection Editor window
The requirement for not repeating the instructions of a loop.
collection
The requirement for not repeating the instructions of a loop.
index
A loop that has no way to end.
loop exit condition
A loop that has no way to end.
looping condition
A loop that has no way to end.
infinite
A loop that has no way to end.
pretest
A loop that has no way to end.
posttest
A loop that has no way to end.
update read
A loop that has no way to end.
String Collection Editor window
A loop that has no way to end.
collection
A loop that has no way to end.
index
A unique number identifying each item in a list box's Items collection.
loop exit condition
A unique number identifying each item in a list box's Items collection.
looping condition
A unique number identifying each item in a list box's Items collection.
infinite
A unique number identifying each item in a list box's Items collection.
pretest
A unique number identifying each item in a list box's Items collection.
posttest
A unique number identifying each item in a list box's Items collection.
update read
A unique number identifying each item in a list box's Items collection.
String Collection Editor window
A unique number identifying each item in a list box's Items collection.
collection
A unique number identifying each item in a list box's Items collection.
index
The requirement for repeating the instructions of a loop.
loop exit condition
The requirement for repeating the instructions of a loop.
looping condition
The requirement for repeating the instructions of a loop.
infinite
The requirement for repeating the instructions of a loop.
pretest
The requirement for repeating the instructions of a loop.
posttest
The requirement for repeating the instructions of a loop.
update read
The requirement for repeating the instructions of a loop.
String Collection Editor window
The requirement for repeating the instructions of a loop.
collection
The requirement for repeating the instructions of a loop.
index
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
42
Which method can you use to delay program execution? What is the syntax of the method?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 42 flashcards in this deck.