DigitsTolType

From WeBWorK_wiki
Revision as of 15:40, 28 April 2021 by Pstaabp (talk | contribs)
Jump to navigation Jump to search
Construction.png This article is under construction. Use the information herein with caution until this message is removed.

Digits TolType


This describes an alternative way for determining the tolerance type based on the number of digits.

Problem Techniques Index

PG problem file Explanation
DOCUMENT();
loadMacros(
  "PGstandard.pl",
  "MathObjects.pl",
  "PGML.pl"
);
TEXT(beginproblem());

Initialization: This is built-in to MathObjects.

Context("Numeric")->flags->set(tolType=>'digits',tolerateTruncation=>0);

Setup:

  • The
    tolType=>'digits'
    switch to the digits tolerance.

BEGIN_PGML
Graph the circle given by the following equation.

	[`[$circle_eq_lhs] = [$r ** 2]`]

[_]{$gt}
END_PGML

Main Text: This asks to graph the circle given by the equation. And the code:

[_]{$gt}

inserts the GraphTool.

BEGIN_PGML_SOLUTION
The equation of the circle of the form:

[`[$circle_eq_lhs] = [$r ** 2]`]

has a center at [`([$h],[$k])`] and radius [$r].   To enter the graph, click the circle tool, then click the center at [`([$h],[$k])`] and then click a second point that is [$r] units from the center.  This is easist going left, right, up or down from the center.
END_PGML_SOLUTION

ENDDOCUMENT();

This is the solution.

Problem Techniques Index


  • POD documentation: [1]