## DESCRIPTION ## Algebra: answer is any solution to an equation ## ENDDESCRIPTION ## KEYWORDS('algebra', 'answer is any solution to an equation') ## 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", "parserSolutionFor.pl", "AnswerFormatHelp.pl", ); TEXT(beginproblem()); ################################## # Set-up Context("Vector"); $r = random(3,6,1); $answer = SolutionFor("x^2+y^2+z^2=$r^2", [$r,0,0] ); #################################### # Main text Context()->texStrings; BEGIN_TEXT A solution to the equation \( $answer->{f} \) is \( (x,y,z) = \) \{ ans_rule(20) \} \{ AnswerFormatHelp("points") \} END_TEXT Context()->normalStrings; ##################################### # Answer evaluation $showPartialCorrectAnswers = 1; ANS( $answer->cmp() ); ##################################### # Solution Context()->texStrings; BEGIN_SOLUTION ${PAR}SOLUTION:${PAR} Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT("MathObject version."); ENDDOCUMENT();