Home
FAQ
About
Log in
Subscribe now
Computer Programming - Chapter 4 - Review Part A
Tools
Copy this to my account
Start over
Print
Help
Name
:
A red asterisk (*) indicates required questions.
There is a logic error in the following code, determine what the error is and rewrite the code so it is correct:
If grade > 90 then
'Display A for grade greater than or equal to 90
Me.lblGrade.Text = "You have an A"
End If
*
What is displayed in the label after the following statement executes? Does the label assignment reflect what was intended? If not, how should the statement be rewritten to produce the intended result?
Dim score As Integer = 25
If score >=100 Then
Me.lblMessage.Text = "You won!"
ElseIf score < 100 Then
Me.lblMessage.Text = "Good try."
ElseIf score < 50 Then
Me.lblMessage.Text = "Practice more."
End If
*
The condition of and If...Then statement is a Boolean expression.
*
Yes
No
A decision structure must have an Else clause.
*
Yes
No
It is good programming style to line up the If, the Else, and the End If in a decision structure, and to indent the lines in between.
*
Yes
No
The Select...Case statement must have the Case Else clause.
*
Yes
No
The Select...Case statement can only be used if you have more than two cases.
*
Yes
No
Mrs. Marian Mitchell
Business/Technology Teacher
North High School
Wichita, KS
View profile