Skip to content

Commit

Permalink
Convert problem to MathObjects and PGML
Browse files Browse the repository at this point in the history
  • Loading branch information
dlglin committed Dec 9, 2022
1 parent 9f9010c commit 8f08e62
Showing 1 changed file with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,22 @@ DOCUMENT(); # This should be the first executable line in the problem.

loadMacros(
"PGstandard.pl",
"PGchoicemacros.pl",
"MathObjects.pl",
"PGML.pl",
"AnswerFormatHelp.pl",
"PGcourse.pl"
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 1;
$pi = 3.141592654;

TEXT(EV2(<<EOT));
Context("Numeric");
$ans = Compute("infinity");

BEGIN_PGML
Find the following limit using l'Hopital's Rule:

\[ \lim_{x \rightarrow 0^{+}} \dfrac{\int_{0}^{x} \sqrt{t}\,\cos t\; dt}{x^{2}} \]

$PAR

Answer: \{ans_rule(80)\}.

$PAR Enter the word "infinity" if the answer is \(\infty\).

EOT

$ans = "infinity";
ANS(str_cmp($ans));
#ANS(fun_cmp($ans, mode=>"antider", vars=>"t"));
[`` \lim_{x \rightarrow 0^{+}} \dfrac{\int_{0}^{x} \sqrt{t}\,\cos t\; dt}{x^{2}} = ``][_]{$ans} [@ AnswerFormatHelp('limits')@]*
END_PGML

ENDDOCUMENT(); # This should be the last executable line in the problem.

0 comments on commit 8f08e62

Please sign in to comment.