Difference between revisions of "Problem8"

From WeBWorK_wiki
Jump to navigation Jump to search
(Created page with 'Prep Main Page > Web Conference 2 > Sample Problems > Problem 8 This is')
 
m (added tag)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
[[PREP_2011|Prep Main Page]] > [[PREP_2011_Web_Conference_II|Web Conference 2]] > [[SampleProblems|Sample Problems]] > Problem 8
 
[[PREP_2011|Prep Main Page]] > [[PREP_2011_Web_Conference_II|Web Conference 2]] > [[SampleProblems|Sample Problems]] > Problem 8
   
This is
 
  +
This is Library/Utah/Business_Algebra/set2_Linear_Equations_and_Functions/p08.pg
  +
  +
DOCUMENT();
  +
  +
loadMacros("PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl",
  +
"PGanswermacros.pl",
  +
"PGauxiliaryFunctions.pl");
  +
  +
TEXT(beginproblem());
  +
$showPartialCorrectAnswers = 1;
  +
  +
# output the text of the problem
  +
  +
$a = random(10,20,1);
  +
$b = random(1,3,1);
  +
  +
TEXT(EV2(<<EOT));
  +
Solve for \(x\): \( \sqrt{x-$a}-\sqrt{x}=-$b \)
  +
$BR
  +
Answer: \(x\) = \{ans_rule(30)\}
  +
EOT
  +
  +
$ans1 = ($a+$b**2)**2/(4*$b**2);
  +
ANS(num_cmp($ans1));
  +
  +
ENDDOCUMENT();
  +
  +
[[Category:PREP 2011]]

Latest revision as of 12:17, 16 June 2021

Prep Main Page > Web Conference 2 > Sample Problems > Problem 8

This is Library/Utah/Business_Algebra/set2_Linear_Equations_and_Functions/p08.pg

DOCUMENT();

loadMacros("PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl",
"PGanswermacros.pl",
"PGauxiliaryFunctions.pl");

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

# output the text of the problem

$a = random(10,20,1);
$b = random(1,3,1);

TEXT(EV2(<<EOT));
Solve for \(x\): \( \sqrt{x-$a}-\sqrt{x}=-$b \)
$BR
Answer:  \(x\) = \{ans_rule(30)\}
EOT

$ans1 = ($a+$b**2)**2/(4*$b**2);
ANS(num_cmp($ans1));

ENDDOCUMENT();