Sie sind auf Seite 1von 5

Public Class PRETEST

Public S As Integer
Dim question1, question2, question3, question4, question5, question6, question7, question8,
question9, question10 As String
Dim ques1, ques2, ques3, ques4, ques5, ques6, ques7, ques8, ques9, ques10 As String
Dim EV As Object
Public I As Integer
Private Sub PRETEST_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Do While (S < 6)
S=0
If MsgBox("Are you sure you want to take and start the quiz?", 48 + 4, "Initiate Quiz")
Then
question1 = InputBox("(1) The Program Statement is any combination of
keywords,properties and fuctions,operators and symbols that work together to create a valid
instructions.(T/F)", "Quiz 1 #1").ToUpper
If question1 = "T" Then
MessageBox.Show("You're right.")
S=S+1
ElseIf question1 = "F" Then
MessageBox.Show("I'm sorry. You're wrong.")
S=S+0
End If
question2 = InputBox("(2) In Label1.Caption = True, the word caption is an objectn
name. (T/F)", "Quiz 1 #2").ToUpper
If question2 = "F" Then
MessageBox.Show("You're right.")
S=S+1
ElseIf question2 = "T" Then
MessageBox.Show("I'm sorry. You're wrong.")
S=S+0
End If
question3 = InputBox("(3) There is always an assignment operator in a program
statement.(T/F)", "Quiz 1 #3").ToUpper
If question3 = "T" Then
MessageBox.Show("You're right.")
S=S+1
ElseIf question3 = "F" Then
MessageBox.Show("I'm sorry. You're wrong.")
S=S+0
End If
question4 = InputBox("(4) The rules in constructing a Visual Basic statement in order to
process the data is called statement syntax.(T/F)", "Quiz 1 #4").ToUpper
If question4 = "T" Then
MessageBox.Show("You're right.")
S=S+1
ElseIf question4 = "F" Then
MessageBox.Show("I'm sorry. You're wrong.")
S=S+0
End If
question5 = InputBox("(5) Start each variable with a number.(T/F)", "Quiz 1
#5").ToUpper
If question5 = "F" Then
MessageBox.Show("You're right.")
S=S+1
ElseIf question5 = "T" Then
MessageBox.Show("I'm sorry. You're wrong.")

S=S+0
End If
question6 = InputBox("(6) Always use Visual Basic keywords,objects or properties as a
variable name.(T/F)", "Quiz 1 #6").ToUpper
If question6 = "F" Then
MessageBox.Show("You're right.")
S=S+1
ElseIf question6 = "T" Then
MessageBox.Show("I'm sorry. You're wrong.")
S=S+0
End If
question7 = InputBox("(7) Variant Variable can store all of the data types and change
formats automatically.(T/F)", "Quiz 1 #7").ToUpper
If question7 = "T" Then
MessageBox.Show("You're right.")
S=S+1
ElseIf question7 = "F" Then
MessageBox.Show("I'm sorry. You're wrong.")
S=S+0
End If
question8 = InputBox("(8) Variable storage size is measured in bytes.(T/F)", "Quiz 1
#8").ToUpper
If question8 = "T" Then
MessageBox.Show("You're right.")
S=S+1
ElseIf question8 = "F" Then
MessageBox.Show("I'm sorry. You're wrong.")
S=S+0
End If
question9 = InputBox("(9) Constant takes the place of a number or a text string that
always changes.(T/F)", "Quiz 1 #9").ToUpper
If question9 = "F" Then
MessageBox.Show("You're right.")
S=S+1
ElseIf question9 = "T" Then
MessageBox.Show("I'm sorry. You're wrong.")
S=S+0
End If
question10 = InputBox("(10) To make a constant available to all forms and modules in
a program, Use a Private keyword.(T/F)", "Quiz 1 #10").ToUpper
If question10 = "F" Then
MessageBox.Show("You're right.")
S=S+1
ElseIf question10 = "T" Then
MessageBox.Show("I'm sorry. You're wrong.")
S=S+0
End If
End If
EV = S
Select Case EV
Case 10
MsgBox(S & " -Perfect")
Case 9, 8
MsgBox(S & " -Excellent")
Case 0 To 7
MsgBox(S & " -Read your lessons in Computer Programming")
Case Else
MsgBox(S & " -Not in Range")

End Select
Loop
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Form1.Show()
Me.Hide()
End Sub
End Class

NOTES:
Mga Maam/Sir, magloloop po dapat yung program kapag lower than 6 ang score .
Kaso yun po ang problema ayaw niya po magloop
Dpat ko po ba lagyan ng button? Kinode kop o siya kasi sa form

Ganun din po ditto di din po siya nagloloop Dito naman po dapat magloloop
kapag mas mababa sa pretest score niya yung score niya sa post test

Public Class POSTTEST


Public S As Integer
Dim question1, question2, question3, question4, question5, question6, question7, question8,
question9, question10 As String
Dim ques1, ques2, ques3, ques4, ques5, ques6, ques7, ques8, ques9, ques10 As String
Dim EV As Object
Public I As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Form1.Show()
Me.Hide()
End Sub
Private Sub POSTTEST_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
I=0
Do Until (I > S)
If MsgBox("Are you sure you want to take and start the quiz?", 48 + 4, "Initiate Quiz")
Then
ques1 = InputBox("(1) The Code Window is a turbo charged text editor with many
productivity tools built in?.(T/F)", "Quiz 2 #1").ToUpper
If ques1 = "T" Then
MessageBox.Show("You're right.")
I=I+1
ElseIf ques1 = "F" Then
MessageBox.Show("I'm sorry. You're wrong.")
I=I+0
End If
ques2 = InputBox("(2) F7 Command opens the code window?.(T/F)", "Quiz 2
#2").ToUpper
If ques2 = "T" Then
MessageBox.Show("You're right.")

I=I+1
ElseIf ques2 = "F" Then
MessageBox.Show("I'm sorry. You're wrong.")
I=I+0
End If
ques3 = InputBox("(3) Farm Files is the place where all the event procedure code and
variables are stored?(T/F)", "Quiz 2 #3").ToUpper
If ques3 = "F" Then
MessageBox.Show("You're right.")
I=I+1
ElseIf ques3 = "T" Then
MessageBox.Show("I'm sorry. You're wrong.")
I=I+0
End If
ques4 = InputBox("(4) The Full Module View shows one procedure at a time? (T/F)",
"Quiz 2 #4").ToUpper
If ques4 = "F" Then
MessageBox.Show("You're right.")
I=I+1
ElseIf ques4 = "T" Then
MessageBox.Show("I'm sorry. You're wrong.")
I=I+0
End If
ques5 = InputBox("(5) The Procedure View Shows one procedure at a time?.(T/F)",
"Quiz 2 #5").ToUpper
If ques5 = "T" Then
MessageBox.Show("You're right.")
I=I+1
ElseIf ques5 = "F" Then
MessageBox.Show("I'm sorry. You're wrong.")
I=I+0
End If
ques6 = InputBox("(6) Carvaggio in the Windows Menu is used to minimize the Code
Window?(T/F)", "Quiz 2 #6").ToUpper
If ques6 = "F" Then
MessageBox.Show("You're right.")
I=I+1
ElseIf ques6 = "T" Then
MessageBox.Show("I'm sorry. You're wrong.")
I=I+0
End If
ques7 = InputBox("(7) Bookmark is used to emphasize a variable or program?(T/F)",
"Quiz 2 #7").ToUpper
If ques7 = "T" Then
MessageBox.Show("You're right.")
I=I+1
ElseIf ques7 = "F" Then
MessageBox.Show("I'm sorry. You're wrong.")
I=I+0
End If
ques8 = InputBox("(8) Blue Square is displayed at the beginning of the program line
when you use a bookmark command? (T/F)", "Quiz 2 #8").ToUpper
If ques8 = "T" Then
MessageBox.Show("You're right.")
I=I+1
ElseIf ques8 = "F" Then
MessageBox.Show("I'm sorry. You're wrong.")
I=I+0

End If
ques9 = InputBox("(9) Panzer is used to create a Print Statement?(T/F)", "Quiz 2
#9").ToUpper
If ques9 = "F" Then
MessageBox.Show("You're right.")
I=I+1
ElseIf ques9 = "T" Then
MessageBox.Show("I'm sorry. You're wrong.")
I=I+0
End If
ques10 = InputBox("(10) Debugging turns off a certain part of a program?(T/F)", "Quiz
2 #10").ToUpper
If ques10 = "T" Then
MessageBox.Show("You're right.")
I=I+1
ElseIf ques10 = "F" Then
MessageBox.Show("I'm sorry. You're wrong.")
I=I+0
End If
End If
EV = I
Select Case EV
Case 10
MsgBox(I & " -Perfect")
Case 9, 8
MsgBox(I & " -Excellent")
Case 5 To 7
MsgBox(I & " -Score Higher in the Next Quiz")
Case 0 To 4
MsgBox(I & " -You really need to open your notebook")
Case Else
MsgBox("Not in Range")
End Select
Loop
End Sub
End Class

Das könnte Ihnen auch gefallen