Answers are lists of points
Download file: PointAnswers.pg
DOCUMENT();
loadMacros('PGstandard.pl', 'PGML.pl', 'contextLimitedPoint.pl', 'PGcourse.pl');
Preamble
Load contextLimitedPoint.pl to prevent operations between points.
Context('LimitedPoint');
$f = Compute("x^2 - 1");
$xint = List(Point("(1, 0)"), Point("(-1, 0)"));
$yint = List(Point("(0, -1)"));
Setup
Context('Point') could be used instead, which would
allow mathematical operations between points (such as adding points as
if they were vectors). The x-intercepts are clearly a list
of points. A list with only one element is used for the
y-intercepts so that a student who mistakenly enters two
points will be told their second point is incorrect. If a list is not
used for the y-intercepts, a student who enters two points
would be given an error message instead.
BEGIN_PGML
Enter the [`x`]-intercept(s) and [`y`]-intercept(s) of [`y = [$f]`]. Enter a
point as [`(a,b)`], including the parentheses. If there is more than one
correct answer, enter a comma separated list of points.
+ [`x`]-intercept(s): [_]{$xint}{15}
+ [`y`]-intercept(s): [_]{$yint}{15}
END_PGML
Statement
Be sure to tell students the proper syntax for how to enter their answers.
BEGIN_PGML_SOLUTION Solution explanation goes here. END_PGML_SOLUTION ENDDOCUMENT();
Solution
A solution should be provided here.