Deck 5: Lists and Loops

ملء الشاشة (f)
exit full mode
سؤال
Which of the following controls and methods provides a simple way to gather input from the user at runtime without placing a text box on a form?

A) ListBox
B) MessageBox
C) ComboBox
D) InputBox
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Which of the following statements will assign a random number between 1 and 50 inclusive to intNum?

A) intNum = rand.Next50) + 1
B) intNum = rand.Next1, 50)
C) intNum = rand.Next50)
D) intNum = rand.Next)
سؤال
In the following statement that begins a For…Next loop, what is the purpose of the Step clause? For intX = 1 to 100 Step 5

A) It causes intX to be initialized to 5 when the loop begins.
B) It causes the loop to end when intX is equal to 5.
C) It causes intX to be incremented by 5 each time the loop repeats.
D) It causes intX to be decremented by 5 each time the loop repeats.
سؤال
The _method can be used to place a new item at any position in a ListBox.

A) Items.New
B) Items.Add
C) Items.Append
D) Items.Insert
سؤال
Setting this property to True will put the items in a ListBox in alphabetical order.

A) Sorted
B) Ordered
C) Reorder
D) Alphabetic
سؤال
Which type of loop repeats as long as its loop condition remains True?

A) Do Until
B) Do While
C) Do Next
D) all of the above
سؤال
To get the number of items stored in a ListBox, use the _property.

A) Count
B) Items
C) Items.Count
D) Number
سؤال
What value is assigned to lblSum.Text by the following code ? Dim intTotal As Integer = 0
For intOuter = 1 To 3
For intInner = intOuter To 3
IntTotal += intOuter * intInner
Next
Next
LblSum.Text = intTotal.ToString)

A) 9
B) 16
C) 25
D) 36
سؤال
How can you cause scroll bars to appear in a ListBox at runtime?

A) Set the ScrollFlag property of the ListBox to True.
B) A scroll bar is automatically added when a ListBox contains more items than can be displayed.
C) Set the ScrollBars property of the ListBox to True.
D) Add a programming statement to call the ScrollBar method of the ListBox.
سؤال
The entries in a ListBox are stored in the _property.

A) Items.Count
B) Items
C) Entries
D) Text
سؤال
All of the following are valid ComboBox style properties, except

A) Drop-Down Combo Box
B) Simple Combo Box
C) List Combo Box
D) Drop-Down List Combo Box
سؤال
This method erases all the items in a ListBox.

A) Items.Delete
B) Items.Erase
C) Items.Clear
D) Items.Remove
سؤال
The first item in a ListBox has an index of .

A) < font_face=symbol >< /font >1
B) 0
C) 1
D) Items.Count
سؤال
Which statement about the ListBox.Add method is true?

A) It will always place the item at the end of the list.
B) It can be used to place an item anywhere in the list.
C) It finds the sum of all of the items in the list.
D) It always puts the item at the beginning of the list.
سؤال
Which property determines the amount of time, in milliseconds, that elapses between the user pointing the mouse at a control and the tool tip text's appearance?

A) FinalDelay
B) ReshowDelay
C) InitialDelay
D) AutoPopDelay
سؤال
What is wrong with the following code? Dim intIndex As Integer
For intIndex = 5 To 1
ListBox.Items.AddintIndex.ToString)
Next

A) The Next statement must read Next intIndex.
B) A For Next loop cannot be used to count backward.
C) intIndex is declared incorrectly for use with this type of loop.
D) You need to specify a negative step value in order to execute this loop.
سؤال
What is the difference in the execution of the Do Until Loop first example) and the Do Loop Until second example)? ' First Example
SngPayAmount = 200
Do Until sngPayAmount > 150
SngPayAmount = sngPayAmount - 50
Loop
'Second Example
SngPayAmount = 200
Do
SngPayAmount = sngPayAmount - 50
Loop Until sngPayAmount > 150

A) Both loops are executed in an identical manner.
B) The first loop will never be executed while the second loop will execute once.
C) The first loop will execute one more time than the second loop.
D) The first loop will never be executed while the second is an infinite loop.
سؤال
Which code example will calculate the number of checked items in a CheckedListBox named clbMovieNames and store the number in intCheckedMovies?

A) Dim intCheckedMovies As Integer = 0 intCheckedMovies = clbMovieNames.Items.Count - 1
B) Dim intIndex As Integer Dim intCheckedMovies As Integer = 0
For intIndex = 0 To clbMovieNames.Items.Count - 1
If clbMovieNames.GetItemCheckedintIndex) = True Then
IntCheckedMovies += 1
End If
Next
C) Dim intIndex As Integer Dim intCheckedMovies As Integer = 0
For intIndex = 0 To clbMovieNames.Items.Count - 1
If clbMovieNames.GetItemCheckedintIndex) = True Then
LstChecked.Items.AddclbCities.ItemsintIndex))
End If
Next
D) Dim intIndex As Integer Dim intCheckedMovies As Integer = 0
For intIndex= 1 To clbMovieNames.Items.Count
If clbMovieNames.GetItemCheckedintIndex) = True Then
IntCheckedMovies += 1
End If
Next
سؤال
Which standard Visual Basic function returns the periodic payment amount for a loan?

A) Pmt
B) IPmt
C) PPmt
D) LPmt
سؤال
Suppose you would like your code to perform several tasks: Use a For…Next loop with an InputBox to prompt the user four times for the price of four different T-shirts, then display each shirt price with a 25% discount in the ListBox lstResult. Which of the following code segments correctly performs these tasks?

A) Dim intIndex As Integer Dim sngPrice, sngDiscountPrice As Single
For intIndex = 0 To 4
SngPrice = CSngInputBox"Enter price of shirt " & intIndex.ToString))
SngDiscountPrice = sngPrice * 0.75
LstResult.Items.AddsngDiscountPrice)
Next
B) Dim intIndex As Integer Dim sngPrice, sngDiscountPrice As Single
For intIndex = 0 To 4
SngPrice = CSngInputBox"Enter price of shirt " & intIndex.ToString))
SngDiscountPrice = sngPrice - .25 * sngPrice)
Next
LstResult.Items.AddsngDiscountPrice)
C) Dim intIndex As Integer Dim sngPrice, sngDiscountPrice As Single
For intIndex = 1 To 4
SngPrice = CSngInputBox"Enter price of shirt " & intIndex.ToString))
SngDiscountPrice = sngPrice * 0.75
LstResult.Items.AddsngDiscountPrice)
Next
D) Dim intIndex As Integer Dim sngPrice, sngDiscountPrice As Single
For intIndex = 1 To 4
SngPrice = CSngInputBox"Enter price of shirt " & intIndex.ToString))
SngDiscountPrice = sngPrice * 0.25
LstResult.Items.AddintIndex & " " & sngDiscountPrice)
Next
سؤال
If lstMonths is a ListBox, which of the following will cause an exception to be thrown?

A) lstMonths.Items0)
B) lstMonths.ItemslstMonths.Items.Count - 1)
C) lstMonths.ItemslstMonths.Items.Count)
D) all of the above
سؤال
A difference between a ListBox and a drop-down ComboBox is ____.

A) a ListBox takes up less room on the form
B) a ComboBox allows the user to enter text other than what is already in the List
C) a ListBox allows the user to enter text other than what is already in the List
D) there is no difference
سؤال
Which of the following statements correctly displays an input box?

A) strUserInput = Input"Enter your First Name")
B) strUserInput = Input"Enter your First Name", "Name")
C) strUserInput = InputBoxEnter your First Name, Enter Name)
D) strUserInput = InputBox"Enter your First Name", "Enter Name")
سؤال
A ___is a loop inside another loop.

A) internal loop
B) nested loop
C) fixed loop
D) multiple loop
سؤال
The InputBox function always returns a _value.

A) Single
B) Double
C) Text
D) String
سؤال
Which type of loop uses a pretest to initialize a counter variable and then increment the counter variable at the end of each iteration?

A) The Do Until Loop
B) The Count Until Loop
C) The Do While Loop
D) The For…Next Loop
سؤال
What will be the final value of intCount? Dim intCount As Integer = 3
Do
IntCount += 6
Loop While intCount < 20

A) 20
B) 21
C) 15
D) 9
سؤال
What is the difference in execution between the two following sections of code? 'Example 1
IntCounter = 0
Do While intCounter < 10
LstOutput.Items.AddintCounter * intCounter)
IntCounter = intCounter + 1
Loop
'Example 2
For intCounter = 0 to 9
LstOutput.Items.AddintCounter * intCounter)
Next intCounter

A) The loop in the first example will execute one more time than the second example.
B) The first example is an infinite loop.
C) Both loops are executed in an identical manner.
D) The loop in the first example will never be executed.
سؤال
The SelectedItem property of a ListBox .

A) contains the index of the currently selected item
B) contains the text of the currently selected item
C) returns the location of the currently selected item
D) returns -1 if no item is selected
سؤال
The _method adds a new entry as the last item in a ListBox.

A) Items.New
B) Items.Add
C) Items.Insert
D) Items.Append
سؤال
Which statement is True in regard to the following code? intCount = 0
Do While intCount < 10
LstOutput.Items.Add"Good Job")
Loop

A) This is an infinite loop.
B) intCount should start at -1.
C) The Items.Insert method should be used instead of Items.Add.
D) The text Good Job should not have quotation marks around it.
سؤال
A counter is an) ___that can be incremented or decremented each time a loop runs.

A) string variable
B) condition
C) integer variable
D) property
سؤال
Which of the following code fragments calculates the average of 5 numbers input with an input box, and displays the result in lblResult?

A) intCount = 5 intSum = 0
Do While intCount = 5
IntSum = CIntInputBox"enter a number"))
SngAvg = intSum / intCount
LblResult.Text = sngAvg.ToString)
Loop
B) intCount = 0 intSum = 0
Do While intCount < =5
IntValue = CIntInputBox"enter a number"))
IntSum = intSum + intValue
Loop
SngAvg = intSum / intCount
LblResult.Text = sngAvg.ToString)
C) intCount = 0 intSum = 0
Do While intCount < = 5
IntValue = CIntInputBox"enter a number"))
IntSum = intSum + intValue
IntCount += 1
Loop
SngAvg = intSum / intCount
LblResult.Text = sngAvg.ToString)
D) intCount = 0 intSum = 0
Do While intCount < 5
IntValue = CIntInputBox"enter a number"))
IntSum = += intValue
IntCount += 1
Loop
SngAvg = intSum / intCount
LblResult.Text = sngAvg.ToString)
سؤال
How many times will the message I love Visual Basic be displayed? Dim intCount As Integer = 0
Do
LstOutPut.Items.Add"I love Visual Basic")
IntCount += 1
Loop While intCount > 10

A) It will display 10 times.
B) It will display once.
C) It will display 2 times.
D) It will not be displayed at all.
سؤال
A ToolTip is a ____that allows the programmer to create a small popup message that displays when the user places the mouse over a control.

A) method
B) property
C) function
D) control
سؤال
Which of the following sections of code will calculate the monthly payment for a $150,000 house with a 30 year mortgage at an annual rate of 5.5%, and assign the result to dblMPay?

A) Dim dblAIntRate as Double = 5.5 Dim dblLoanAmt as Double = 150000
Dim intYears as Integer = 30
Dim dblMPay as Double
DblMPay = PmtdblAIntRate / 12, intYears * 12, -dblLoanAmt)
B) Dim dblAIntRate as Double = 5.5 Dim dblLoanAmt as Double = 150000
Dim intYears as Integer = 30
Dim dblMPay as Double
DblMPay = PmtdblAIntRate, intYears, -dblLoanAmt)
C) Dim dblAIntRate as Double = 5.5 Dim dblLoanAmt as Double = 150000
Dim intYears as Integer = 30
Dim dblMPay as Double
DblMPay = PmtdblAIntRate / 12, intYears, -dblLoanAmt)
D) Dim dblAIntRate as Double = 5.5 Dim dblLoanAmt as Double = 150000
Dim intYears as Integer = 30
Dim dblMPay as Double
DblMPay = PmtdblAIntRate, intYears * 12, -dblLoanAmt)
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/36
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 5: Lists and Loops
1
Which of the following controls and methods provides a simple way to gather input from the user at runtime without placing a text box on a form?

A) ListBox
B) MessageBox
C) ComboBox
D) InputBox
D
2
Which of the following statements will assign a random number between 1 and 50 inclusive to intNum?

A) intNum = rand.Next50) + 1
B) intNum = rand.Next1, 50)
C) intNum = rand.Next50)
D) intNum = rand.Next)
A
3
In the following statement that begins a For…Next loop, what is the purpose of the Step clause? For intX = 1 to 100 Step 5

A) It causes intX to be initialized to 5 when the loop begins.
B) It causes the loop to end when intX is equal to 5.
C) It causes intX to be incremented by 5 each time the loop repeats.
D) It causes intX to be decremented by 5 each time the loop repeats.
C
4
The _method can be used to place a new item at any position in a ListBox.

A) Items.New
B) Items.Add
C) Items.Append
D) Items.Insert
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
5
Setting this property to True will put the items in a ListBox in alphabetical order.

A) Sorted
B) Ordered
C) Reorder
D) Alphabetic
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
6
Which type of loop repeats as long as its loop condition remains True?

A) Do Until
B) Do While
C) Do Next
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
7
To get the number of items stored in a ListBox, use the _property.

A) Count
B) Items
C) Items.Count
D) Number
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
8
What value is assigned to lblSum.Text by the following code ? Dim intTotal As Integer = 0
For intOuter = 1 To 3
For intInner = intOuter To 3
IntTotal += intOuter * intInner
Next
Next
LblSum.Text = intTotal.ToString)

A) 9
B) 16
C) 25
D) 36
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
9
How can you cause scroll bars to appear in a ListBox at runtime?

A) Set the ScrollFlag property of the ListBox to True.
B) A scroll bar is automatically added when a ListBox contains more items than can be displayed.
C) Set the ScrollBars property of the ListBox to True.
D) Add a programming statement to call the ScrollBar method of the ListBox.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
10
The entries in a ListBox are stored in the _property.

A) Items.Count
B) Items
C) Entries
D) Text
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
11
All of the following are valid ComboBox style properties, except

A) Drop-Down Combo Box
B) Simple Combo Box
C) List Combo Box
D) Drop-Down List Combo Box
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
12
This method erases all the items in a ListBox.

A) Items.Delete
B) Items.Erase
C) Items.Clear
D) Items.Remove
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
13
The first item in a ListBox has an index of .

A) < font_face=symbol >< /font >1
B) 0
C) 1
D) Items.Count
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
14
Which statement about the ListBox.Add method is true?

A) It will always place the item at the end of the list.
B) It can be used to place an item anywhere in the list.
C) It finds the sum of all of the items in the list.
D) It always puts the item at the beginning of the list.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
15
Which property determines the amount of time, in milliseconds, that elapses between the user pointing the mouse at a control and the tool tip text's appearance?

A) FinalDelay
B) ReshowDelay
C) InitialDelay
D) AutoPopDelay
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
16
What is wrong with the following code? Dim intIndex As Integer
For intIndex = 5 To 1
ListBox.Items.AddintIndex.ToString)
Next

A) The Next statement must read Next intIndex.
B) A For Next loop cannot be used to count backward.
C) intIndex is declared incorrectly for use with this type of loop.
D) You need to specify a negative step value in order to execute this loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
17
What is the difference in the execution of the Do Until Loop first example) and the Do Loop Until second example)? ' First Example
SngPayAmount = 200
Do Until sngPayAmount > 150
SngPayAmount = sngPayAmount - 50
Loop
'Second Example
SngPayAmount = 200
Do
SngPayAmount = sngPayAmount - 50
Loop Until sngPayAmount > 150

A) Both loops are executed in an identical manner.
B) The first loop will never be executed while the second loop will execute once.
C) The first loop will execute one more time than the second loop.
D) The first loop will never be executed while the second is an infinite loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
18
Which code example will calculate the number of checked items in a CheckedListBox named clbMovieNames and store the number in intCheckedMovies?

A) Dim intCheckedMovies As Integer = 0 intCheckedMovies = clbMovieNames.Items.Count - 1
B) Dim intIndex As Integer Dim intCheckedMovies As Integer = 0
For intIndex = 0 To clbMovieNames.Items.Count - 1
If clbMovieNames.GetItemCheckedintIndex) = True Then
IntCheckedMovies += 1
End If
Next
C) Dim intIndex As Integer Dim intCheckedMovies As Integer = 0
For intIndex = 0 To clbMovieNames.Items.Count - 1
If clbMovieNames.GetItemCheckedintIndex) = True Then
LstChecked.Items.AddclbCities.ItemsintIndex))
End If
Next
D) Dim intIndex As Integer Dim intCheckedMovies As Integer = 0
For intIndex= 1 To clbMovieNames.Items.Count
If clbMovieNames.GetItemCheckedintIndex) = True Then
IntCheckedMovies += 1
End If
Next
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
19
Which standard Visual Basic function returns the periodic payment amount for a loan?

A) Pmt
B) IPmt
C) PPmt
D) LPmt
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
20
Suppose you would like your code to perform several tasks: Use a For…Next loop with an InputBox to prompt the user four times for the price of four different T-shirts, then display each shirt price with a 25% discount in the ListBox lstResult. Which of the following code segments correctly performs these tasks?

A) Dim intIndex As Integer Dim sngPrice, sngDiscountPrice As Single
For intIndex = 0 To 4
SngPrice = CSngInputBox"Enter price of shirt " & intIndex.ToString))
SngDiscountPrice = sngPrice * 0.75
LstResult.Items.AddsngDiscountPrice)
Next
B) Dim intIndex As Integer Dim sngPrice, sngDiscountPrice As Single
For intIndex = 0 To 4
SngPrice = CSngInputBox"Enter price of shirt " & intIndex.ToString))
SngDiscountPrice = sngPrice - .25 * sngPrice)
Next
LstResult.Items.AddsngDiscountPrice)
C) Dim intIndex As Integer Dim sngPrice, sngDiscountPrice As Single
For intIndex = 1 To 4
SngPrice = CSngInputBox"Enter price of shirt " & intIndex.ToString))
SngDiscountPrice = sngPrice * 0.75
LstResult.Items.AddsngDiscountPrice)
Next
D) Dim intIndex As Integer Dim sngPrice, sngDiscountPrice As Single
For intIndex = 1 To 4
SngPrice = CSngInputBox"Enter price of shirt " & intIndex.ToString))
SngDiscountPrice = sngPrice * 0.25
LstResult.Items.AddintIndex & " " & sngDiscountPrice)
Next
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
21
If lstMonths is a ListBox, which of the following will cause an exception to be thrown?

A) lstMonths.Items0)
B) lstMonths.ItemslstMonths.Items.Count - 1)
C) lstMonths.ItemslstMonths.Items.Count)
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
22
A difference between a ListBox and a drop-down ComboBox is ____.

A) a ListBox takes up less room on the form
B) a ComboBox allows the user to enter text other than what is already in the List
C) a ListBox allows the user to enter text other than what is already in the List
D) there is no difference
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
23
Which of the following statements correctly displays an input box?

A) strUserInput = Input"Enter your First Name")
B) strUserInput = Input"Enter your First Name", "Name")
C) strUserInput = InputBoxEnter your First Name, Enter Name)
D) strUserInput = InputBox"Enter your First Name", "Enter Name")
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
24
A ___is a loop inside another loop.

A) internal loop
B) nested loop
C) fixed loop
D) multiple loop
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
25
The InputBox function always returns a _value.

A) Single
B) Double
C) Text
D) String
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
26
Which type of loop uses a pretest to initialize a counter variable and then increment the counter variable at the end of each iteration?

A) The Do Until Loop
B) The Count Until Loop
C) The Do While Loop
D) The For…Next Loop
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
27
What will be the final value of intCount? Dim intCount As Integer = 3
Do
IntCount += 6
Loop While intCount < 20

A) 20
B) 21
C) 15
D) 9
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
28
What is the difference in execution between the two following sections of code? 'Example 1
IntCounter = 0
Do While intCounter < 10
LstOutput.Items.AddintCounter * intCounter)
IntCounter = intCounter + 1
Loop
'Example 2
For intCounter = 0 to 9
LstOutput.Items.AddintCounter * intCounter)
Next intCounter

A) The loop in the first example will execute one more time than the second example.
B) The first example is an infinite loop.
C) Both loops are executed in an identical manner.
D) The loop in the first example will never be executed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
29
The SelectedItem property of a ListBox .

A) contains the index of the currently selected item
B) contains the text of the currently selected item
C) returns the location of the currently selected item
D) returns -1 if no item is selected
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
30
The _method adds a new entry as the last item in a ListBox.

A) Items.New
B) Items.Add
C) Items.Insert
D) Items.Append
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
31
Which statement is True in regard to the following code? intCount = 0
Do While intCount < 10
LstOutput.Items.Add"Good Job")
Loop

A) This is an infinite loop.
B) intCount should start at -1.
C) The Items.Insert method should be used instead of Items.Add.
D) The text Good Job should not have quotation marks around it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
32
A counter is an) ___that can be incremented or decremented each time a loop runs.

A) string variable
B) condition
C) integer variable
D) property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
33
Which of the following code fragments calculates the average of 5 numbers input with an input box, and displays the result in lblResult?

A) intCount = 5 intSum = 0
Do While intCount = 5
IntSum = CIntInputBox"enter a number"))
SngAvg = intSum / intCount
LblResult.Text = sngAvg.ToString)
Loop
B) intCount = 0 intSum = 0
Do While intCount < =5
IntValue = CIntInputBox"enter a number"))
IntSum = intSum + intValue
Loop
SngAvg = intSum / intCount
LblResult.Text = sngAvg.ToString)
C) intCount = 0 intSum = 0
Do While intCount < = 5
IntValue = CIntInputBox"enter a number"))
IntSum = intSum + intValue
IntCount += 1
Loop
SngAvg = intSum / intCount
LblResult.Text = sngAvg.ToString)
D) intCount = 0 intSum = 0
Do While intCount < 5
IntValue = CIntInputBox"enter a number"))
IntSum = += intValue
IntCount += 1
Loop
SngAvg = intSum / intCount
LblResult.Text = sngAvg.ToString)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
34
How many times will the message I love Visual Basic be displayed? Dim intCount As Integer = 0
Do
LstOutPut.Items.Add"I love Visual Basic")
IntCount += 1
Loop While intCount > 10

A) It will display 10 times.
B) It will display once.
C) It will display 2 times.
D) It will not be displayed at all.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
35
A ToolTip is a ____that allows the programmer to create a small popup message that displays when the user places the mouse over a control.

A) method
B) property
C) function
D) control
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
36
Which of the following sections of code will calculate the monthly payment for a $150,000 house with a 30 year mortgage at an annual rate of 5.5%, and assign the result to dblMPay?

A) Dim dblAIntRate as Double = 5.5 Dim dblLoanAmt as Double = 150000
Dim intYears as Integer = 30
Dim dblMPay as Double
DblMPay = PmtdblAIntRate / 12, intYears * 12, -dblLoanAmt)
B) Dim dblAIntRate as Double = 5.5 Dim dblLoanAmt as Double = 150000
Dim intYears as Integer = 30
Dim dblMPay as Double
DblMPay = PmtdblAIntRate, intYears, -dblLoanAmt)
C) Dim dblAIntRate as Double = 5.5 Dim dblLoanAmt as Double = 150000
Dim intYears as Integer = 30
Dim dblMPay as Double
DblMPay = PmtdblAIntRate / 12, intYears, -dblLoanAmt)
D) Dim dblAIntRate as Double = 5.5 Dim dblLoanAmt as Double = 150000
Dim intYears as Integer = 30
Dim dblMPay as Double
DblMPay = PmtdblAIntRate, intYears * 12, -dblLoanAmt)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 36 في هذه المجموعة.