RandomQuestion
procedure, ex
cept that it calls
RightAnswer
and
WrongAnswer
in stead of
DoingWell
and
DoingPoorly
):
Sub RandomQuestion()
Dim first As In
teger
Dim sec
ond As In
teger
first = Int(10 * Rnd)
sec
ond = Int(10 * Rnd)
an
swer = InputBox("What is " & first & " + " & sec
ond & "?")
If an
swer = first + sec
ond Then
RightAnswer
Else
WrongAnswer
End If
End Sub
Add
Ran
dom
ize
to the
Ini
tial
ize
pro ce dure.
Remove
ActivePresentation.SlideShowWindow.View.Next
from
RightAnswer
and
WrongAnswer
so it does not automatically ad vance to the next slide.
For this to work properly, you need three slides: a ti tle slide, a question
slide, and a feedback slide. The title slide has a button tied to
GetStarted
. The
question slide has a button tied to
RandomQuestion
and a button that goes to
the next card. And the feedback slide has a button tied to
Feed
back
.
If you are ad venturous, you might try to eliminate the feedback slide and
keep a run ning to tal in a text box on the slide. Af ter each question, up date the
text in the text box. You already have the num ber of correct and in correct an -
swers stored in
numCorrect
and
numIncorrect
. You simply need to use this
to up date a text box af ter each question is answered.
Ran dom Num bers 145
Do'stlaringiz bilan baham: |