Skip to content

Commit aa45221

Browse files
authored
Merge pull request #1022 from gajennings/main
Update problem to accept varied forms of correct answers
2 parents 9c21554 + 6927087 commit aa45221

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

OpenProblemLibrary/UCSB/Stewart5_10_2/Stewart5_10_2_30.pg

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,34 @@ DOCUMENT();
1717
loadMacros(
1818
"PGstandard.pl",
1919
"MathObjects.pl",
20+
"parserImplicitPlane.pl",
2021
"PGcourse.pl"
2122
);
2223

23-
TEXT(&beginproblem);
24+
TEXT(beginproblem());
25+
2426
$showPartialCorrectAnswers = 1;
2527

26-
Context("Numeric");
28+
Context("ImplicitPlane");
29+
Context()->variables->are(x => Real, y => Real);
2730

28-
$ans1 = Compute("-2x+11");
29-
$ans2 = Compute("x-1");
31+
$ans1 = ImplicitPlane("y=-2x+11");
32+
$ans2 = ImplicitPlane("y=x-1");
33+
$ans = List($ans1,$ans2);
3034

3135
Context()->texStrings;
3236
BEGIN_TEXT
3337

3438
Find an equation for each line that passes through the point (4, 3) and is tangent to the parametric curve
3539
\[x=3t^2+1,\;\;y=2t^3+1.\]
36-
If there is more than one answer then order your answers consecutively so lines with smaller slopes appear before lines with larger slopes. If some answer fields are not used enter $BBOLD None $EBOLD in the unused answer blanks and list them last.
37-
38-
$PAR
39-
Tangent line 1: \(y\) = \{ans_rule(25)\}
40-
41-
$PAR
42-
Tangent line 2: \(y\) = \{ans_rule(25)\}
40+
If there are multiple answers then separate distinct answers with commas.
4341

4442
$PAR
45-
Tangent line 3: \(y\) = \{ans_rule(25)\}
43+
\{ans_rule()\}
4644

4745
END_TEXT
4846
Context()->normalStrings;
4947

50-
ANS($ans1->cmp());
51-
ANS($ans2->cmp());
52-
ANS(List('None')->cmp());
48+
ANS($ans->cmp());
5349

5450
ENDDOCUMENT();

0 commit comments

Comments
 (0)