Author a Maple syntax sub-type
The Maple-graded Maple syntax question sub-type is one of the two sub-types of the Maple-graded question.
This sub-type is authored by inserting a Maple-graded component for the student response.
With the Maple syntax sub-type:
Students must enter Maple commands in their response when the question is configured with text entry mode.
Student responses are parsed into proper Maple syntax when the question is configured with symbolic entry mode.
You, as the question author, get to decide whether the student's response requires text entry mode or symbolic entry mode.
The Maple syntax sub-type accepts equations, differential operators, integral signs, summations, vectors, matrices, differential equations, and a wide range of other advanced mathematical expressions.
Maple syntax sub-type with text entry mode
When authoring a Maple syntax question sub-type, you can select to require the student to use text as their response entry.
Student responses must use proper Maple syntax since it's passed directly to the Maple engine without any parsing.
Here are some notes when the Text entry only mode is selected:
Student responses must use an asterisk (*) symbol to denote multiplication in all cases (Example — Maple syntax reads
x*(x+1)as multiplication butx(x+1)as function notation).Your grading code should detect if a student is using a Maple command to calculate the answer (check out Prevent cheating via entry of Maple code).
Your grading code should accept the unevaluated form of Maple commands (Example —
Diffis the inert form ofdiff).If your grading code is one line of code (Example —
evalb($RESPONSE=factor(x^2-1);), a student response with a semicolon will be graded as incorrect (Example —(x-1)*(x+1);).
You can instead write your grading code as two lines that are completed with semicolons (Example —
A:= $RESPONSE; evalb(A=factor(x^2-1);) so that a student response with a semicolon will be graded as correct.Alternatively, specify in the question text whether a trailing semicolon is required.
Maple syntax sub-type with symbolic entry mode
When authoring a Maple syntax question sub-type, you can select to require the student to use symbols as their response entry.
Student symbolic responses are parsed into proper Maple syntax.
Here are some notes when the Symbolic entry only mode is selected:
Möbius parses the student response to convert the entered expression into Maple syntax, which is sent through the Maple engine.
Since a translation of the symbolic entry into a Maple Input expression takes place, the technique of using $RESPONSE to check whether students entered a specific command may not be appropriate.
Supported Maple syntax notation
Specific notation is supported while authoring a Maple syntax question sub-type:
Subscript
Greek letters
Subscripts
Subscripts are available when authoring a Maple-graded Maple syntax question sub-type.
Use square brackets (x[n]) (Example — r[0]) to denote subscript in the Answer and Grading Code fields during authoring.
Greek letters
Both upper-case Greek letters and lower-case Greek letters are available when authoring a Maple-graded Maple syntax question sub-type that uses the symbolic entry mode.
Use case-sensitive entry to denote the appropriate Greek letter in the Answer and Grading Code fields during authoring:
Example — Enter
alphafor the Greek letter a.Example — Enter
Alphafor the Greek letterA.
Example: Basic
This example requires the student response to use Maple syntax and allows for a sophisticated grading code.
Question statement:
What is the intersection of the sets {a, b, c} and {b, c, d, e} ?
Enclose your response in braces, { }.
Answer field syntax:
{b,c}
Grading code syntax:
evalb($RESPONSE={a,b,c} intersect {b,c,d,e});
Expression type:
Maple Syntax
Text/Symbolic entry:
Text entry only
Example: Infinite number of correct answers
This example accepts an infinite number of correct answers using the Maple grading code so that you don't need to define an explicit list of correct answers.
Question statement:
Give an invertible matrix.
Answer field syntax:
No answer field value required.
Grading code syntax:
x:=LinearAlgebra[Determinant]($RESPONSE); evalb(type(x,numeric) and x<>0);
Expression type:
Maple Syntax
Text/Symbolic entry:
Symbolic entry only
Example: Algorithm
This example uses an algorithm to generate multiple forms of the same question.
A complex Maple grading code allows this complicated question to be successfully graded.
Question statement:
Find the equation of the plane that passes through <1,0,0>, <0,1,0> and <$a,$b,$c>.Write your answer in the form Ax+By+Cz+D=0 (using lower case x, y, and z).
Algorithm:
$a=range(1,5); $b=range(1,5); $c=range(1,5);
Answer field syntax:
n := LinearAlgebra:-CrossProduct(<$a,$b,$c>-<1,0,0>, <0,1,0>-<1,0,0>);n[1]*(x-1)+n[2]*y+n[3]*z=0;
Grading code syntax:
evalb( lhs($RESPONSE)=lhs($ANSWER) or lhs($RESPONSE)=-1*(lhs($ANSWER)) );
Expression type:
Maple Syntax
Text/Symbolic entry:
Symbolic entry only
Example: Formatted correct answer
This example uses the printf(MathML[ExportPresentation](a)); command so that the correct answer is properly formatted using MathML when displayed to the student.
Question statement:
Give the coefficient matrix of the following system:
Algorithm:
$ans=maple("Matrix([[1,2,-3],[7,-1,2]])");
Answer field syntax:
printf(MathML[ExportPresentation]($ans));
Grading code syntax:
LinearAlgebra[Equal]($RESPONSE,$ans);
Expression type:
Maple Syntax
Text/Symbolic entry:
Symbolic entry only
