version 1.2, 2010/05/15 12:58:43
|
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'; |