Craig Yager
Grade 5 teacher
---------------------------------------------------------------
Please post messages to the Logo forum to log...@gsn.org. Mail
questions about the list administration to log...@gsn.org. To
unsubscribe send unsubscribe logo-l to majo...@gsn.org.
(btw it is possible to move those bulky question and answer and announce boxes
around the screen to places where they don't get in the way. Look up set in
Help to learn how to do this)
It is also possible to do multiple choice answers. The question primitive
can't handle multiple choice but you can do it by constructing your own textbox
to contain the multiple choice. Here is one way to do this:
Make a largish textbox, it will be automatically named text1, then hide it
(right button feature or type
text1, hidetext in the command centre)
also make a q2 button (once only)
this won't work if you type q2 in command centre because readchar requires that
you click on the background of the page, for some strange reason that I don't
understand.
to q2
text1, ct showtext
settc "red setstyle "bold setfontsize 20
pr [The millenium bug is:]
settc "black setstyle "italic setfontsize 14
pr [Type the letter of the BEST answer to this question:]
settc "green
pr [a) a new type of flyspray]
pr[b) Hepatitis B]
pr[c) a description of someone who can't count to 1000]
pr [d) a dance that bees do when they find honey]
pr [e) none of the above]
next2 readchar
end
to next2 :any
ifelse :any = "e [announce "Correct fd 50][announce [Bad Luck, try again] bk
50]
wait 20, hidetext
end
Explanations:
settc = set text colour
readchar waits for a character to be typed off the key board
:any (pronounce dots any is a temporary variable declared on the to line of the
next2 procedure. It will take the value of the keystroke corresponding to
readchar.