Project Folders
Teacher Resources
Student Resources
How Do I?
Site Map
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: MIA, Ask an Expert: Having trouble comparing two variables
From: askanexpert@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Date: Sun, 27 Feb 2011 22:50:43 -0700

This is an automatic message sent from the web form at:

from: Joseph D. Saggio <jsaggio@xxxxxxxxxxxxxxxxxxx>
date: Sun Feb 27 22:50:43 2011
platform: PC
version: MicroWorlds Pro

The program below is the start of a multiple choice test builder. The problem 
we are having if you enter the correct answer b in this case it does not see 
the correct answer b and the user answer b as equal?

;          Microworld's Logo Assignment #3
;          Joseph D. Saggio
;          Multiple Choice Question Engine 
; add a large text box 

to main
local [mquestion ans1 ans2 ans3 ans4 correct_ans]
multipleq [b][What is the capital of New York State? ] [a. Buffalo] [b. 
Albany] [c. Manhattan] [d. Suffolk County]                                
;================================================== Procedures

to multipleq correct_ans mquestion ans1 ans2 ans3 ans4 
   print thing "mquestion
   print :ans1
   print :ans2
   print :ans3
   print :ans4
print "correct               ;troubleshooting
print :correct_ans
   question [Answer....? ]
print "users_answer          ;troubleshooting
print answer
   Ifelse answer = :correct_ans 
          [print "answers_match]
          [print "answers_do_not_match]

to start

  • Previous by thread: MIA, Ask an Expert: Bug in announce?
  • Next by thread: Re: MIA, Ask an Expert: Having trouble comparing two variables

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.

    © copyright 2001 - 2008