Last active
May 7, 2019 10:08
-
-
Save hig3/d97de7762f6c50491935f210f853515e to your computer and use it in GitHub Desktop.
Maple T.A. algorithm variables for polynomial division excercise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$a1=range(-3,3); | |
$b1=range(-3,3); | |
$b2=range(-3,3); | |
: no japanese comments | |
: avoid $b2 being zero. ne=not equal | |
condition:ne($b2,0); | |
$p1=maple("x^2+($a1)*x+($b1)"); | |
$p2=maple("x+($b2)"); | |
$ans1=maple("expand(($p1)*($p2),x)"); | |
$ans2=maple("quo(($p1),($p2),x)"); | |
$ans3=maple("rem(($p1),($p2),x)"); | |
: correct the source in the youtube video | |
$disp=maple("proc(A) printf(MathML[ExportPresentation](A)); end proc;"); | |
$p1disp=maple("$disp($p1)"); | |
$p2disp=maple("$disp($p2)"); | |
$ans1disp=maple("$disp($ans1)"); | |
$ans2disp=maple("$disp($ans2)"); | |
$ans3disp=maple("$disp($ans2)"); | |
: common $grade1 could be specified in every answer field | |
$grade1=maple("proc(A,R) evalb(A-R=0) end proc;"); | |
$grade2=maple("proc(A,R) evalb(A-R=0) end proc;"); | |
$grade3=maple("proc(A,R) evalb(A-R=0) end proc;"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment