@@ -25,23 +25,18 @@ DOCUMENT();
2525loadMacros(
2626 "PGstandard.pl",
2727 "MathObjects.pl",
28- "parserAssignment.pl",
29- "answerCustom.pl",
30- "weightedGrader.pl",
28+ "parserImplicitPlane.pl",
3129 "PGcourse.pl"
3230);
3331##############################################################
3432
35- install_weighted_grader();
36-
3733TEXT(beginproblem());
3834
39- $showPartialCorrectAnswers = 0;
35+ $showPartialCorrectAnswers = 1;
4036
4137##############################################################
4238
43- Context("Numeric")->variables->add(y=>'Real');
44- parser::Assignment->Allow;
39+ Context("Point");
4540Context()->strings->add(none=>{},EmptySet=>{alias=>"none"});
4641
4742$a = random(2,4,1);
@@ -57,11 +52,16 @@ $an1b = Point(-$a,0);
5752$an2a = Point($c,0);
5853$an2b = Point(-$c,0);
5954
60- $an3a = Formula("y=($b/$a)*x");
61- $an3b = Formula("y=-($b/$a)*x");
62-
6355$ans1 = List($an1a, $an1b);
6456$ans2 = List($an2a, $an2b);
57+
58+ Context("ImplicitPlane");
59+ Context()->variables->are(x=>'Real',y=>'Real');
60+ Context()->strings->add(none=>{},EmptySet=>{alias=>"none"});
61+
62+ $an3a = ImplicitPlane("y=($b/$a)*x");
63+ $an3b = ImplicitPlane("y=-($b/$a)*x");
64+
6565$ans3 = List($an3a, $an3b);
6666
6767##############################################################
@@ -76,16 +76,17 @@ Answer (separate by commas): \{ans_rule(30)\} $PAR
7676$BBOLD 2.$EBOLD Find the foci. $BBOLD List your answers as points in the form \((a,b)\). $EBOLD $BR
7777Answer (separate by commas): \{ans_rule(30)\} $PAR
7878$BBOLD 3.$EBOLD Find the equations of the asymptotes. $BR
79- Equation(s) (in slope-intercept form \(y=mx+b\) and separate by commas): \{ans_rule(30)\}
79+ (Separate equations by commas): \{ans_rule(30)\}
8080$BR
8181END_TEXT
8282Context()->normalStrings;
8383
8484##############################################################
8585
86- Context("Numeric");
87- WEIGHTED_ANS( ($ans1)->cmp(showHints=>0,showTypeWarnings=>0), 33 );
88- WEIGHTED_ANS( ($ans2)->cmp(showHints=>0,showTypeWarnings=>0), 33 );
89- WEIGHTED_ANS( ($ans3)->cmp(showHints=>0,showTypeWarnings=>0, showEqualErrors=> 0), 34 );
86+
87+ ANS( $ans1->cmp());
88+ ANS( $ans2->cmp());
89+ ANS( $ans3->cmp());
90+
9091
9192ENDDOCUMENT();
0 commit comments