Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
88 lines (61 sloc) 1.3 KB
## DESCRIPTION
## Precalculus: function table of values
## ENDDESCRIPTION
## DBsubject(WeBWorK)
## DBchapter(WeBWorK tutorial)
## DBsection(Fort Lewis tutorial 2011)
## Date(01/30/2011)
## Institution(Fort Lewis College)
## Author(Paul Pearson)
## MO(1)
## KEYWORDS('precalculus', 'function table of values')
###########################
# Initialization
DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"AnswerFormatHelp.pl",
"PGcourse.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
Solution explanation goes here.
END_SOLUTION
Context()->normalStrings;
;
ENDDOCUMENT();