########################################################## # # Example showing how to use the built-in answer checker for parsed values. # DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PGbasicmacros.pl", "PGanswermacros.pl", "Parser.pl", "parserUtils.pl", ); TEXT(beginproblem()); ########################################################## # # The setup # Context("Numeric"); $a = random(1,5,1); $f = Formula("(x^2-$a)/(x^2+$a)"); ########################################################## # # The problem text # Context()->texStrings; BEGIN_TEXT Suppose \(\displaystyle f(x) = $f\). $PAR Then \(f\) is defined for all \(x\) except for \{ans_rule(30)\}. $PAR ${BCENTER} ${BSMALL} To enter more than one value, separate them by commas.$BR Enter ${LQ}${BTT}NONE${ETT}${RQ} if there are no such values. ${ESMALL} ${ECENTER} END_TEXT Context()->normalStrings; ########################################################### # # The answer # ANS(List("NONE")->cmp); $showPartialCorrectAnswers = 1; ########################################################### ENDDOCUMENT(); # This should be the last executable line in the problem.