WeBWorKdocs

sq_webwork:


Home
Current UR
courses
Visitor
page
Intro to
WeBWorK
WeBWorK 2
Twiki
WW
Community
Grant Support
& awards
Discussion
group
Problem
library
Write/modify
problems
Create &
manage course
Tutorial on
running a course
HowTos
FAQ
WeBWorK2
FAQ
Software
Download
How to
Install WW server
Feedback
Site Map
Change
preferences
Change
password





Prev | Next | tutorial

This page is no longer being maintained. The new URL for this content is http://webwork.maa.org/wiki/MultipleChoiceProblems


(1 pt) rochesterLibrary/setMAAtutorial/multiplechoiceexample.pg

Multiple choice example

What is the derivative of tan(x)?


A. \cos^3(x)
B. \cosh(x)
C. -\cot(x)
D. \sec^2(x)
E. \sin(x)
F. \text{sech}(x)
G. \tan(x)


WARNINGS
µ¦å{h­


{viewSource(setMAAtutorial/multiplechoiceexample.pg)}


Create a multiple choice question using the new_multiple_choice call.

Use qa() to enter the question and the correct answer. Any duplicates will be eliminated.

After calling qa you can use extra() to add in extra incorrect answers that (along with the

correct answer) will be made into a random list of answers shown to the student.

If you want certain answers to be at the end of the list instead of having them be randomized

you can use makeLast to add specific answers to the end of the list of answers or to force

already existing answers to be moved to the end of the list. This is usually done for

'None of the above', or 'All of the above' type answers. Note that if 'None of the above'

is the correct answer then you must put it in qa() and then also makeLast() but the duplicate

will be eliminated. If more than one extra answer is added via makeLast, they are added

in the same order they are given in makeLast.

Now you would start your problem with a C<BEGIN_TEXT> tag and print the questions

and answers with the print_q() and print_a() commands. Within the C<BEGIN_TEXT/END_TEXT block>,

all calls to objects must be enclosed in ( ).

(The $PAR start a new paragraph by printing a blank line).

Now all that''s left is sending the students answers to the answer evaluator

along with the correct answers so that the students answers can be checked and

a score can be given. This is done using C<ANS>, an answer evaluator and the

C<correct_ans> variable.


Prev | Next | tutorial

Last update: Monday, March 3, 2008 at 7:02:36 PM.
This site maintained using Manila and Frontier software.