version 1.1, 2010/04/25 13:18:36
|
version 1.3, 2010/10/31 12:33:08
|
Line 34 Write $solution as an Egyptian Fraction<
|
Line 34 Write $solution as an Egyptian Fraction<
|
<customresponse answerdisplay="$possible" id="11"> |
<customresponse answerdisplay="$possible" id="11"> |
<answer type="loncapa/perl"># Analyze the format |
<answer type="loncapa/perl"># Analyze the format |
($formaterror,$doubleerror)=&analyze($submission); |
($formaterror,$doubleerror)=&analyze($submission); |
if ($formaterror || $doubleerror) { return 'BAD_FORMULA'; } |
if ($formaterror || $doubleerror) { return 'WRONG_FORMAT'; } |
# It is an Egyptian Fraction, is the value correct? |
# It is an Egyptian Fraction, is the value correct? |
if (&cas('maxima',$submission.'-('.$egyptian.')') eq '0') { |
if (&cas('maxima',$submission.'-('.$egyptian.')') eq '0') { |
return 'EXACT_ANS'; |
return 'EXACT_ANS'; |
Line 60 return 'INCORRECT';</answer>
|
Line 60 return 'INCORRECT';</answer>
|
<hintpart on="double"> |
<hintpart on="double"> |
<startouttext /> |
<startouttext /> |
<p> |
<p> |
Egyptian Fractions cannot have the same denominator more than once. For example, 1/3+1/17+1/4+/17 is not an Egyptian Fraction, as it has 17 twice as denominator. |
Egyptian Fractions cannot have the same denominator more than once. For example, 1/3+1/17+1/4+1/17 is not an Egyptian Fraction, as it has 17 twice as denominator. |
</p> |
</p> |
<endouttext /> |
<endouttext /> |
</hintpart> |
</hintpart> |