This code demonstrates the WHILE loop, you'll have to figure out for yourself how to make it work for your particular assignment.
Public Class Form1
Private ableToProgram As Boolean = False
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
Dim grade As String
Dim decision As String
While Not ableToProgram
decision = InputBox("Do you want to cheat? (Y/N)", _
"Learn to Program", "Y")
If decision.ToUpper = "Y" Then
grade = PostAssignmentOnForums()
Else
grade = DoWorkYourself()
End If
MsgBox(String.Format("You got an {0}", grade))
End While
MsgBox("Good Choice!")
End Sub
Function PostAssignmentOnForums() As String
ableToProgram = False
Return "F"
End Function
Function DoWorkYourself() As String
ableToProgram = True
Return "A"
End Function
End Class