Professional Documents
Culture Documents
3. A) Textbox allows the user to type in numbers and letters for the computer. A
checkbox will allow you to check things that you would like to add to say a
sandwich. A radio button will only allow you to select one of the radio
buttons.
B) A textbox should be used for a guess a number game. A checkbox would
be used for toppings on a sandwich. And the radio button would be used to
for a calculator to decide if you want it in a certain mode.
4. A) False
B) True
C) True
D) False
E) True
5. A)
B)
if totalpoints >= 100 and totalpoints <= 200 then
Me.lblHigh.text = High Scorer
End if
C)
6. A) even, odd
B)
9.
End If
13. Select Case Me.txtMonth.Text
Case "JANUARY", "MARCH", "MAY", "JULY", "AUGUST", "OCTOBER", "DECEMBER"
MessageBox.Show("There are 31 days in this month.")
Case "APRIL", "JUNE", "SEPTEMBER", "NOVEMBER"
MessageBox.Show("There are 30 days in this month.")
Case "FEBRUARY"
If Val(Me.txtYear.Text Mod 4 <> 0) Then
MessageBox.Show("There are 28 days in this month.")
ElseIf Val(Me.txtYear.Text Mod 400 = 0) Then
MessageBox.Show("There are 29 days in this month.")
ElseIf Val(Me.txtYear.Text Mod 100 = 0) Then
MessageBox.Show("There are 28 days in this month.")
Else
MessageBox.Show("There are 29 days in this month.")
End If
Case Else
MessageBox.Show("Invalid entry.")
End Select
16. A) True.
c) True.
d) False. The Case Else clause is optional.
e) False. The Select...Case statement can be used for any number of
cases.
f) False. It will not produce an error, but the numbers generated from run
to run will not be different.
g) False. They are floating point numbers with a decimal portion.
h) False. Algorithms are designed before any code is written.
i) False. They are only retained if declared as Static.
j) True.
K) True.
l) False. Not is evaluated before And, which is evaluated before Or.
m) False. They can be used alone, anywhere.
n) True.
o) False. It is not in the form of a counter variable, which is counter +=
constant.
p) False. There is no limit to how many check boxes can be selected at
once.
q) False. The line continuation character may be used to split statements onto
multiple lines.