Deck 8: More on the Repetition Structure

Full screen (f)
exit full mode
Question
When using the Do...Loop statement to code a counter-controlled loop, you must include a statement to declare and ____ the counter variable.

A) initialize
B) size
C) identify
D) specify
Use Space or
up arrow
down arrow
to flip the card.
Question
You use the ____ method to select all of the text contained in a text box.

A) Select
B) SelectText
C) SelectEvent
D) SelectAll
Question
Three styles of combo boxes are available in Visual Basic.
Question
The purpose of the ____ operator is to reverse the sign of a number.

A) reversal
B) change-sign
C) negation
D) switch
Question
A combo box cannot replace a list box.
Question
In a For...Next statement, the declaration, initialization, update, and comparison tasks are handled by the ____ clause.

A) For
B) Init
C) Setup
D) Loop
Question
A ____ sign in a For clause indicates that the loop body will be processed as long as the counter variable's value is less than or equal to the number or variable following the sign.

A) =
B) >=
C)
D) =>
Question
In the following For clause, if the stepvalue is negative, then the startvalue must be ____ to the endvalue for the loop instructions to be processed. For counter [As datatype] = startvalue To endvalue [Step stepvalue]

A) less than or equal
B) greater than or equal
C) equal
D) less than
Question
Within a For...Next statement, the loop's condition is evaluated ____ the loop body is processed.

A) after
B) before
C) once
D) as soon as
Question
In the following For clause, you can use the ____ portion to declare the counter variable. For counter [As datatype] = startvalue To endvalue [Step stepvalue]

A) startvalue
B) startvalue To endvalue
C) Step stepvalue
D) As datatype
Question
In the following For clause, when you declare the counter variable using the For clause's As datatype argument, the counter variable has ____ scope. For counter [As datatype] = startvalue To endvalue [Step stepvalue]

A) procedure
B) local
C) block
D) open
Question
The loop created by a For...Next statement is a posttest loop.
Question
A programmer uses a counter-controlled loop to process the loop instructions a(n) ____ number of times.

A) infinite
B) unrestricted
C) unlimited
D) precise
Question
Unlike selection structures, repetition structures cannot be nested.
Question
In the following For clause, when you declare the counter variable in a Dim statement at the beginning of a procedure, the counter variable has ____ scope. For counter [As datatype] = startvalue To endvalue [Step stepvalue]

A) procedure
B) local
C) block
D) open
Question
You can place one For...Next statement within another For...Next statement.
Question
Many programmers use a(n) ____ to represent the For clause in a flowchart.

A) octagon
B) hexagon
C) circle
D) diamond
Question
In the following For clause, if the stepvalue is positive, then the startvalue must be ____ to the endvalue for the loop instructions to be processed. For counter [As datatype] = startvalue To endvalue [Step stepvalue]

A) less than or equal
B) greater than or equal
C) equal
D) greater than
Question
In the following For clause, if you omit the stepvalue argument, a stepvalue of ____ is used. For counter [As datatype] = startvalue To endvalue [Step stepvalue]

A) null
B) -1
C) 0
D) 1
Question
In the following For clause, how many times will the computer count though the loop structure? For counter As numeric = 1 To 5 Step 1

A) 1
B) 4
C) 5
D) 6
Question
The ____________________ method calculates the periodic payments on a loan amount.
Question
Given the following For clause, describe the four values or arguments recorded inside the For clause flowchart hexagon.
For counter [As datatype] = startvalue To endvalue [Step stepvalue]
Question
Describe the way in which a control's TextChanged event occurs.
Question
Why is it highly recommended to specify the name of the counter variable in the Next clause of a For...Next statement?
Question
The style of a combo box is controlled by the combo box's ____ property.

A) Default
B) DropDownStyle
C) Selected
D) Index
Question
How do you decide where to declare the For…Next statement's counter variable? What considerations should be taken into account?
Question
In the following For clause, the startvalue , endvalue , and stepvalue items must be a(n) ____________________ data type.
For counter [As datatype] = startvalue To endvalue [Step stepvalue]
Question
In Visual Basic, how many styles of combo boxes are available?

A) one
B) two
C) three
D) four
Question
Describe the two ways in which a text box's Enter event occurs.
Question
In the following For clause, describe how the computer will count though the loop structure.
For counter As Integer = 9 To 14 Step 1
Question
A text box's ____________________ event occurs when the text box receives the focus.
Question
Describe the two main differences between a combo box and a list box and the advantages of each.
Question
In a ____ combo box, the list portion is always displayed.

A) DropDown
B) Simple
C) DropDownList
D) Standard
Question
What is the purpose of an image list control?
Question
A ____ is similar to a list box in that it allows the user to select from a list of choices.

A) combo box
B) pulldown box
C) selection box
D) choice box
Question
It is customary in Windows applications to select (highlight) the existing text when a text box receives the ____________________.
Question
In a ____ combo box, the text portion is not editable.

A) DropDown
B) Simple
C) DropDownList
D) Standard
Question
You use the ____ tool in the toolbox to add a combo box to an interface.

A) ComboBox
B) Combo
C) Box
D) ComboList
Question
A control's ____________________ event occurs when a change is made to the contents of the control's Text property.
Question
Describe the three combo box styles available in Visual Basic and how they are set.
Question
Match between columns
Used to select the contents of a text box
counter-controlled loop
Used to select the contents of a text box
SelectAll method
Used to select the contents of a text box
startValue
Used to select the contents of a text box
endValue
Used to select the contents of a text box
Simple
Used to select the contents of a text box
nested
Used to select the contents of a text box
DropDown
Used to select the contents of a text box
combo box
Used to select the contents of a text box
list box
The default style of a combo box
counter-controlled loop
The default style of a combo box
SelectAll method
The default style of a combo box
startValue
The default style of a combo box
endValue
The default style of a combo box
Simple
The default style of a combo box
nested
The default style of a combo box
DropDown
The default style of a combo box
combo box
The default style of a combo box
list box
Tells the computer where to begin counting for a loop
counter-controlled loop
Tells the computer where to begin counting for a loop
SelectAll method
Tells the computer where to begin counting for a loop
startValue
Tells the computer where to begin counting for a loop
endValue
Tells the computer where to begin counting for a loop
Simple
Tells the computer where to begin counting for a loop
nested
Tells the computer where to begin counting for a loop
DropDown
Tells the computer where to begin counting for a loop
combo box
Tells the computer where to begin counting for a loop
list box
Allows the full list of choices to be hidden
counter-controlled loop
Allows the full list of choices to be hidden
SelectAll method
Allows the full list of choices to be hidden
startValue
Allows the full list of choices to be hidden
endValue
Allows the full list of choices to be hidden
Simple
Allows the full list of choices to be hidden
nested
Allows the full list of choices to be hidden
DropDown
Allows the full list of choices to be hidden
combo box
Allows the full list of choices to be hidden
list box
Placing one loop within another
counter-controlled loop
Placing one loop within another
SelectAll method
Placing one loop within another
startValue
Placing one loop within another
endValue
Placing one loop within another
Simple
Placing one loop within another
nested
Placing one loop within another
DropDown
Placing one loop within another
combo box
Placing one loop within another
list box
Style that always displays the List portion of a combo box
counter-controlled loop
Style that always displays the List portion of a combo box
SelectAll method
Style that always displays the List portion of a combo box
startValue
Style that always displays the List portion of a combo box
endValue
Style that always displays the List portion of a combo box
Simple
Style that always displays the List portion of a combo box
nested
Style that always displays the List portion of a combo box
DropDown
Style that always displays the List portion of a combo box
combo box
Style that always displays the List portion of a combo box
list box
Does not allow the full list of choices to be hidden
counter-controlled loop
Does not allow the full list of choices to be hidden
SelectAll method
Does not allow the full list of choices to be hidden
startValue
Does not allow the full list of choices to be hidden
endValue
Does not allow the full list of choices to be hidden
Simple
Does not allow the full list of choices to be hidden
nested
Does not allow the full list of choices to be hidden
DropDown
Does not allow the full list of choices to be hidden
combo box
Does not allow the full list of choices to be hidden
list box
Tells the computer where to end counting for a loop
counter-controlled loop
Tells the computer where to end counting for a loop
SelectAll method
Tells the computer where to end counting for a loop
startValue
Tells the computer where to end counting for a loop
endValue
Tells the computer where to end counting for a loop
Simple
Tells the computer where to end counting for a loop
nested
Tells the computer where to end counting for a loop
DropDown
Tells the computer where to end counting for a loop
combo box
Tells the computer where to end counting for a loop
list box
Used when you want the computer to process instructions a precise number of times.
counter-controlled loop
Used when you want the computer to process instructions a precise number of times.
SelectAll method
Used when you want the computer to process instructions a precise number of times.
startValue
Used when you want the computer to process instructions a precise number of times.
endValue
Used when you want the computer to process instructions a precise number of times.
Simple
Used when you want the computer to process instructions a precise number of times.
nested
Used when you want the computer to process instructions a precise number of times.
DropDown
Used when you want the computer to process instructions a precise number of times.
combo box
Used when you want the computer to process instructions a precise number of times.
list box
Question
How do you add images to an Image List Control's images collection?
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 8: More on the Repetition Structure
1
When using the Do...Loop statement to code a counter-controlled loop, you must include a statement to declare and ____ the counter variable.

A) initialize
B) size
C) identify
D) specify
A
2
You use the ____ method to select all of the text contained in a text box.

A) Select
B) SelectText
C) SelectEvent
D) SelectAll
D
3
Three styles of combo boxes are available in Visual Basic.
True
4
The purpose of the ____ operator is to reverse the sign of a number.

A) reversal
B) change-sign
C) negation
D) switch
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
5
A combo box cannot replace a list box.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
6
In a For...Next statement, the declaration, initialization, update, and comparison tasks are handled by the ____ clause.

A) For
B) Init
C) Setup
D) Loop
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
7
A ____ sign in a For clause indicates that the loop body will be processed as long as the counter variable's value is less than or equal to the number or variable following the sign.

A) =
B) >=
C)
D) =>
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
8
In the following For clause, if the stepvalue is negative, then the startvalue must be ____ to the endvalue for the loop instructions to be processed. For counter [As datatype] = startvalue To endvalue [Step stepvalue]

A) less than or equal
B) greater than or equal
C) equal
D) less than
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
9
Within a For...Next statement, the loop's condition is evaluated ____ the loop body is processed.

A) after
B) before
C) once
D) as soon as
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
10
In the following For clause, you can use the ____ portion to declare the counter variable. For counter [As datatype] = startvalue To endvalue [Step stepvalue]

A) startvalue
B) startvalue To endvalue
C) Step stepvalue
D) As datatype
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
11
In the following For clause, when you declare the counter variable using the For clause's As datatype argument, the counter variable has ____ scope. For counter [As datatype] = startvalue To endvalue [Step stepvalue]

A) procedure
B) local
C) block
D) open
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
12
The loop created by a For...Next statement is a posttest loop.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
13
A programmer uses a counter-controlled loop to process the loop instructions a(n) ____ number of times.

A) infinite
B) unrestricted
C) unlimited
D) precise
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
14
Unlike selection structures, repetition structures cannot be nested.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
15
In the following For clause, when you declare the counter variable in a Dim statement at the beginning of a procedure, the counter variable has ____ scope. For counter [As datatype] = startvalue To endvalue [Step stepvalue]

A) procedure
B) local
C) block
D) open
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
16
You can place one For...Next statement within another For...Next statement.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
17
Many programmers use a(n) ____ to represent the For clause in a flowchart.

A) octagon
B) hexagon
C) circle
D) diamond
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
18
In the following For clause, if the stepvalue is positive, then the startvalue must be ____ to the endvalue for the loop instructions to be processed. For counter [As datatype] = startvalue To endvalue [Step stepvalue]

A) less than or equal
B) greater than or equal
C) equal
D) greater than
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
19
In the following For clause, if you omit the stepvalue argument, a stepvalue of ____ is used. For counter [As datatype] = startvalue To endvalue [Step stepvalue]

A) null
B) -1
C) 0
D) 1
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
20
In the following For clause, how many times will the computer count though the loop structure? For counter As numeric = 1 To 5 Step 1

A) 1
B) 4
C) 5
D) 6
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
21
The ____________________ method calculates the periodic payments on a loan amount.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
22
Given the following For clause, describe the four values or arguments recorded inside the For clause flowchart hexagon.
For counter [As datatype] = startvalue To endvalue [Step stepvalue]
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
23
Describe the way in which a control's TextChanged event occurs.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
24
Why is it highly recommended to specify the name of the counter variable in the Next clause of a For...Next statement?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
25
The style of a combo box is controlled by the combo box's ____ property.

A) Default
B) DropDownStyle
C) Selected
D) Index
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
26
How do you decide where to declare the For…Next statement's counter variable? What considerations should be taken into account?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
27
In the following For clause, the startvalue , endvalue , and stepvalue items must be a(n) ____________________ data type.
For counter [As datatype] = startvalue To endvalue [Step stepvalue]
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
28
In Visual Basic, how many styles of combo boxes are available?

A) one
B) two
C) three
D) four
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
29
Describe the two ways in which a text box's Enter event occurs.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
30
In the following For clause, describe how the computer will count though the loop structure.
For counter As Integer = 9 To 14 Step 1
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
31
A text box's ____________________ event occurs when the text box receives the focus.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
32
Describe the two main differences between a combo box and a list box and the advantages of each.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
33
In a ____ combo box, the list portion is always displayed.

A) DropDown
B) Simple
C) DropDownList
D) Standard
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
34
What is the purpose of an image list control?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
35
A ____ is similar to a list box in that it allows the user to select from a list of choices.

A) combo box
B) pulldown box
C) selection box
D) choice box
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
36
It is customary in Windows applications to select (highlight) the existing text when a text box receives the ____________________.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
37
In a ____ combo box, the text portion is not editable.

A) DropDown
B) Simple
C) DropDownList
D) Standard
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
38
You use the ____ tool in the toolbox to add a combo box to an interface.

A) ComboBox
B) Combo
C) Box
D) ComboList
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
39
A control's ____________________ event occurs when a change is made to the contents of the control's Text property.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
40
Describe the three combo box styles available in Visual Basic and how they are set.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
41
Match between columns
Used to select the contents of a text box
counter-controlled loop
Used to select the contents of a text box
SelectAll method
Used to select the contents of a text box
startValue
Used to select the contents of a text box
endValue
Used to select the contents of a text box
Simple
Used to select the contents of a text box
nested
Used to select the contents of a text box
DropDown
Used to select the contents of a text box
combo box
Used to select the contents of a text box
list box
The default style of a combo box
counter-controlled loop
The default style of a combo box
SelectAll method
The default style of a combo box
startValue
The default style of a combo box
endValue
The default style of a combo box
Simple
The default style of a combo box
nested
The default style of a combo box
DropDown
The default style of a combo box
combo box
The default style of a combo box
list box
Tells the computer where to begin counting for a loop
counter-controlled loop
Tells the computer where to begin counting for a loop
SelectAll method
Tells the computer where to begin counting for a loop
startValue
Tells the computer where to begin counting for a loop
endValue
Tells the computer where to begin counting for a loop
Simple
Tells the computer where to begin counting for a loop
nested
Tells the computer where to begin counting for a loop
DropDown
Tells the computer where to begin counting for a loop
combo box
Tells the computer where to begin counting for a loop
list box
Allows the full list of choices to be hidden
counter-controlled loop
Allows the full list of choices to be hidden
SelectAll method
Allows the full list of choices to be hidden
startValue
Allows the full list of choices to be hidden
endValue
Allows the full list of choices to be hidden
Simple
Allows the full list of choices to be hidden
nested
Allows the full list of choices to be hidden
DropDown
Allows the full list of choices to be hidden
combo box
Allows the full list of choices to be hidden
list box
Placing one loop within another
counter-controlled loop
Placing one loop within another
SelectAll method
Placing one loop within another
startValue
Placing one loop within another
endValue
Placing one loop within another
Simple
Placing one loop within another
nested
Placing one loop within another
DropDown
Placing one loop within another
combo box
Placing one loop within another
list box
Style that always displays the List portion of a combo box
counter-controlled loop
Style that always displays the List portion of a combo box
SelectAll method
Style that always displays the List portion of a combo box
startValue
Style that always displays the List portion of a combo box
endValue
Style that always displays the List portion of a combo box
Simple
Style that always displays the List portion of a combo box
nested
Style that always displays the List portion of a combo box
DropDown
Style that always displays the List portion of a combo box
combo box
Style that always displays the List portion of a combo box
list box
Does not allow the full list of choices to be hidden
counter-controlled loop
Does not allow the full list of choices to be hidden
SelectAll method
Does not allow the full list of choices to be hidden
startValue
Does not allow the full list of choices to be hidden
endValue
Does not allow the full list of choices to be hidden
Simple
Does not allow the full list of choices to be hidden
nested
Does not allow the full list of choices to be hidden
DropDown
Does not allow the full list of choices to be hidden
combo box
Does not allow the full list of choices to be hidden
list box
Tells the computer where to end counting for a loop
counter-controlled loop
Tells the computer where to end counting for a loop
SelectAll method
Tells the computer where to end counting for a loop
startValue
Tells the computer where to end counting for a loop
endValue
Tells the computer where to end counting for a loop
Simple
Tells the computer where to end counting for a loop
nested
Tells the computer where to end counting for a loop
DropDown
Tells the computer where to end counting for a loop
combo box
Tells the computer where to end counting for a loop
list box
Used when you want the computer to process instructions a precise number of times.
counter-controlled loop
Used when you want the computer to process instructions a precise number of times.
SelectAll method
Used when you want the computer to process instructions a precise number of times.
startValue
Used when you want the computer to process instructions a precise number of times.
endValue
Used when you want the computer to process instructions a precise number of times.
Simple
Used when you want the computer to process instructions a precise number of times.
nested
Used when you want the computer to process instructions a precise number of times.
DropDown
Used when you want the computer to process instructions a precise number of times.
combo box
Used when you want the computer to process instructions a precise number of times.
list box
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
42
How do you add images to an Image List Control's images collection?
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.