#DESCRIPTION ## Algebra problem: function definition ##ENDDESCRIPTION ##KEYWORDS('algebra', 'function', 'definition') DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGgraphmacros.pl" ); TEXT(beginproblem()); $showPartialCorrectAnswers = 1; $a = random(2,25,1); $b = random(2,25,1); BEGIN_TEXT Express the rule "Multiply by $a, then add $b" as the function $BR$BR \(f(x)=\) \{ans_rule(15)\}. $BR END_TEXT $ans1 = "$a*x+$b"; ANS(fun_cmp($ans1)); ENDDOCUMENT(); # This should be the last executable line in the problem.