Programming Home Projects with Microsoft Small Basic by Philip Conrod & Lou Tylee

Programming Home Projects with Microsoft Small Basic by Philip Conrod & Lou Tylee

Author:Philip Conrod & Lou Tylee [Conrod, Philip]
Language: eng
Format: azw3
ISBN: 9781937161996
Publisher: Kidware Software LLC
Published: 2017-05-01T04:00:00+00:00


All of this information is available from the defined variables.

The exam results are presented in the StartStopButtonClicked subroutine (following clicking of Stop Exam). A message box is used to display the results. The modified procedure (changes are shaded) is:

Sub StartStopButtonClicked

If (Controls.GetButtonCaption(StartStopButton) = "Start Exam") Then

Controls.SetButtonCaption(StartStopButton, "Stop Exam")

' Reset the score

NumberTried = 0

NumberCorrect = 0

Shapes.SetText(MessageArea, "")

Controls.HideControl(NextButton)

Controls.HideControl(OpenButton)

Controls.HideControl(ExitButton)

Controls.HideControl(OptionsButton)

NextQuestion()

Else

Controls.SetButtonCaption(StartStopButton, "Start Exam")

Shapes.SetText(GivenDisplay, "")

If (NumberTried > 0) Then

Message = "Questions Tried: " + NumberTried + CRLF

Message = Message + "Questions Correct: " + NumberCorrect + CRLF + CRLF

Message = Message + "Your Score: " + Math.Floor(100 * (NumberCorrect / NumberTried)) + "%"

GraphicsWindow.ShowMessage(Message, "Results")

EndIf



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.