Powerful PowerPoint for Educators: Using Visual Basic for Applications to Make PowerPoint Interactive


Download 1.37 Mb.
Pdf ko'rish
bet88/191
Sana08.05.2023
Hajmi1.37 Mb.
#1442581
1   ...   84   85   86   87   88   89   90   91   ...   191
Bog'liq
2.2. Powerful PowerPoint For Educators

RightAnswer
and
WrongAnswer
procedures.
Keep ing Score 93


In Chapter 6, we did something similar with
GetStarted
,
Ini 
tial 
ize
,
RightAnswer
, and 
WrongAnswer
, us ing stars for feedback and not keeping
score. The sig nificant ad ditions to this script are the vari ables:
numCorrect
and 
numIncorrect
.
numCorrect
con tains the number of questions answered cor-
rectly.
numIncorrect
con tains the number of questions answered in correctly.
Each time a cor rect an swer is chosen, the procedure
RightAnswer
is called in
which
numCorrect
is in creased by one (
numCorrect = numCorrect + 1
).
Each time a wrong an swer is chosen, the pro cedure
WrongAnswer
is called in
which
numIncorrect
is in 
creased by one (
numIncorrect =
numIncorrect + 1
). When you want to find out how you are do ing, call the
pro ce dure 
Feed 
back
to dis play a
MsgBox
with how many questions were right
(
numCorrect
) out of how many were an 
swered (
numCorrect +
numIncorrect
). In addition, before the test starts, call the pro 
cedure
GetStarted
to ini tialize the vari ables (set 
numCorrect
and 
numIncorrect
to 0), ask for the student’s name, and move to the first question. Other than the
variables, all the parts of this script are things you have seen before.
You might want to report the score in other forms. Now that we know how
many questions were an swered correctly and how many were an swered in cor-
rectly, you can ad just the

Download 1.37 Mb.

Do'stlaringiz bilan baham:
1   ...   84   85   86   87   88   89   90   91   ...   191




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling