Maple Grading Issues: Intervals

 

Questions that require intervals as answers require special care in Maple grading.


Simple Case

Open intervals are the easiest to mark. If the answer is (a,b) simply use the grading code:

 

evalb(($RESPONSE)=((a,b)));

 

a and b can be algorithmic and even infinities! To mark for an infinite endpoint use the word infinity in the grading code.

 

Closed Endpoints

This is not as simple, as Mobius will not accept evalb(($RESPONSE)=((a,b]));

Instead you need to use the RealRange function:

 

evalb(($RESPONSE)=(RealRange(Open(-2),1)));

 

will mark (-2,1] as correct. Notice that the default endpoint in RealRange is closed. For example RealRange(-2,1) is [-2,1].

For an infinite endpoint, use the word infinity

 

RealRange(-3,infinity) is [-3,∞)

 

Displaying Answers

You can either use a simple printf statement:

 

printf("%A", " (-∞,1)")

 

or you can use the MathML expression. You need to enclose intervals in quotes in this case.

 

printf(MathML[ExportPresentation]("(-∞,1)"));


Maple Grading Issues Index

Main Index

Last updated: 02/25/2022 SS/DAG