[ww-bugs] Bug 3467: New: GCF of monomial is not correct
bugzilla-daemon at webwork.maa.org
bugzilla-daemon at webwork.maa.org
Mon Sep 28 08:28:59 EDT 2015
http://bugs.webwork.maa.org/show_bug.cgi?id=3467
Summary: GCF of monomial is not correct
Product: Problem libraries
Version: unspecified
Platform: PC
URL: Library/NewHampshire/unh_schoolib/GCF_LCM/gcfsrs301.pg
OS/Version: Mac OS
Status: NEW
Severity: enhancement
Priority: P5
Component: Library (OPL)
AssignedTo: jj at asu.edu
ReportedBy: edwin.florez at upr.edu
Web browser ---
version:
Path: NewHampshire/unh_schoolib/GCF_LCM/gcfsrs301.pg
Hello,
in this problem part d the ANS must be
ANS(Formula("$m1 m**$m2")->cmp);
but still there are some problems with the structure of the PG, please checked.
I made these small changes, now works,
#DESCRIPTION
##Type of
#ENDDESCRIPTION
DOCUMENT();
loadMacros(
"PGstandard.pl",
"PGchoicemacros.pl",
#"PGgraphmacros.pl",
"MathObjects.pl",
#"compoundProblem.pl",
#"contextCurrency.pl",
#"contextInequalities.pl",
#"unionLists.pl",
"unionMacros.pl",
#"contextLimitedNumeric.pl",
);
Context("Numeric");
Context()->variables->are(m=>'Real', n=>'Real');
$showPartialCorrectAnswers = 1;
$ans1=random(6,12,6);
$a2=random(5,11,6);
$b2=random(7,13,6);
$c2=random(11,17,6);
$a=$ans1*$a2;
$b=$ans1*$b2;
$ans2=random(5,25,10);
$c=$ans2*$b2;
$d=$ans2*$c2;
$ans3=random(24,72,24);
$e=$ans3*5;
$f=$ans3*7;
$h=random(2,4,1);
$hh=random(2,4,1);
$k=random(2,4,1);
$kk=random(2,4,1);
$m1=random(4,6,1);
$n1=$m1*random(5,9,2);
$n2=$m1*random(3,4,1);
$m2=random(2,4,1);
$p1=$m2*random(2,3,1);
$p2=$m2*random(5,7,1);
$q=random(2,4,1);
$s1=$q*random(3,4,1);
$s2=$q*random(5,7,1);
$r=random(4,6,1);
$t1=$r*random(3,4,1);
$t2=$r*random(5,7,1);
$x=random(6,18,6);
$q1=$x*7;
$q2=$x*5;
TEXT(beginproblem());
Context()->texStrings;
BEGIN_TEXT
$PAR
For each of the following pairs of numbers, find the GCF. [In more
advanced and college courses this will be called the GCD (greatest
common divisor) rather than GCF (greatest common factor)].
$PAR
GCF($a,$b)=\{ans_rule(3)\}
$PAR
GCF($c,$d)=\{ans_rule(3)\}
$PAR
GCF($e,$f)=\{ans_rule(3)\}
$PAR
For each of the following pairs of monomials, find the GCF.
$PAR
GCF(\($n1 m^{$p1},$n2 m^{$p2}\))=\{ans_rule(10)\}
$PAR
GCF(\($q1 m^{$s1}n^{$t2},$q2 m^{$s2}n^{$t1} \))=\{ans_rule(10)\}
END_TEXT
Context()->normalStrings;
ANS(Real($ans1)->cmp);
ANS(Real($ans2)->cmp);
ANS(Real($ans3)->cmp);
ANS(Formula("$m1 m**$m2")->cmp);
ANS(Formula("$x m**$s1 n**$t1")->cmp);
Context()->texStrings;
SOLUTION(EV3(<<'END_SOLUTION'));
$PAR Solution $PAR
Sometimes it is easy to see the greatest common factor of two numbers. $BR If
you are trying a problem that does not look easy, it is often helpful to $BR
just do it one piece at a time. $PAR
Suppose you wanted to find GCF(120,168). Well you can see that 2 divides both
$BR so put a 2 on your GCF list and divide the two numbers by 2 to see that
you$BR
are now looking for GCF(60,84). You might now notice either 2 or 4 is a factor
of both.$BR Suppose you noticed 4, Put it on your GCF list and divide to see
that$BR now you want GCF( 15,21). Now you see 3, which you can put on your GCF
list $BR and look for GCF(5,7). But that is 1. So you can multiply the
numbers on your GCF list $BR to get \(2\times 4\times 3=24\) and so 24 is your
GCF.
$PAR
If you have really unpleasant numbers to work with there is a clever procedure
called $BR the Euclidean Algorithm which is explained in one of the advanced
problems and$BR is very efficient.
END_SOLUTION
Context()->normalStrings;
ENDDOCUMENT();
--
Configure bugmail: http://bugs.webwork.maa.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the webwork-bugs
mailing list