Difference between revisions of "Problem7"

From WeBWorK_wiki
Jump to navigation Jump to search
(Created page with 'Prep Main Page > Web Conference 2 > Sample Problems > Problem 7 This is Library/Rochester/setAlgebra08LinearEqns…')
 
m (added tag)
 
Line 31: Line 31:
 
 
 
ENDDOCUMENT();
 
ENDDOCUMENT();
  +
  +
[[Category:PREP 2011]]

Latest revision as of 12:17, 16 June 2021

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

This is Library/Rochester/setAlgebra08LinearEqns/sw3_1_7.pg

DOCUMENT();

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

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

$a = random(2,9,1);
$b = random(2,4,1);
$c = non_zero_random(-10,10,1);

TEXT(EV2(<<EOT));
Solve the equation \(\displaystyle \frac{$a}{x}+\frac{$b}{2x} = $c\) algebraically.
$BR $BR \( x = \) \{ans_rule(20) \}
$BR$BR
Please also use your calculator to verify your answer. 
EOT

$ans = ($a + $b/2)/$c;
ANS(num_cmp($ans));

ENDDOCUMENT();