## DESCRIPTION ## Multiple choice template ## ENDDESCRIPTION ## KEYWORDS('multiple choice', 'template') ## DBsubject('WeBWorK') ## DBchapter('WeBWorK Tutorial') ## DBsection('Fort Lewis Tutorial 2011') ## Date('01/30/2011') ## Author('Paul Pearson') ## Institution('Fort Lewis College') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') ########################### # Initialization DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "PGchoicemacros.pl", ); TEXT(beginproblem()); ########################### # Setup $mc = new_checkbox_multiple_choice(); $mc -> qa ( "Select all expressions that are equivalent to \( e^{x^2 + 1/x} \). There may be more than one correct answer.", "\( e^{x^2} e^{1/x} \) $BR", "\( e^{x^2} e^{x^{-1}} \) $BR", ); $mc -> extra( "\( \displaystyle \frac{ e^{x^2} }{ e^x } \) $BR", ); $mc -> makeLast("None of the above"); ########################### # Main text Context()->texStrings; BEGIN_TEXT Additional instructions can be put here. $BR \{ $mc -> print_q() \} $BR \{ $mc -> print_a() \} END_TEXT Context()->normalStrings; ############################ # Answer evaluation install_problem_grader(~~&std_problem_grader); $showPartialCorrectAnswers = 0; ANS( checkbox_cmp( $mc->correct_ans() ) ); ############################ # Solution Context()->texStrings; BEGIN_SOLUTION ${PAR}SOLUTION:$PAR The correct answer is \{ $mc->correct_ans() \} END_SOLUTION Context()->normalStrings; COMMENT('MathObject version.'); ENDDOCUMENT();