## DESCRIPTION ## Precalculus: function table of values ## ENDDESCRIPTION ## KEYWORDS('precalculus', 'function table of values') ## 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", "AnswerFormatHelp.pl", ); TEXT(beginproblem()); ########################### # Setup Context("Numeric"); $f = Formula("3^(-x)"); @answer = (); foreach my $i (0..2) { $answer[$i] = $f->eval(x=>$i); } ########################### # Main text Context()->texStrings; BEGIN_TEXT If \( f(x) = $f \), fill in the table of values with numbers. \{ AnswerFormatHelp("numbers") \} $PAR $BCENTER \{ begintable(5) . row( "\(x = \)", "0", "1", "2" ) . row( "\(f(x) = \)", ans_rule(5), ans_rule(5), ans_rule(5) ) . endtable(); \} $ECENTER END_TEXT Context()->normalStrings; ############################ # Answer evaluation $showPartialCorrectAnswers = 1; foreach my $i (0..2) { ANS( $answer[$i]->cmp() ); } ############################ # Solution Context()->texStrings; BEGIN_SOLUTION ${PAR}SOLUTION:${PAR} Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT('MathObject version.'); ENDDOCUMENT();