![]() |
Maple Grading Issues: Intervals |
|
|
Questions that require intervals as answers require special care in Maple grading.
Simple CaseOpen 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 EndpointsThis is not as simple, as Mobius will not accept evalb(($RESPONSE)=((a,b]));. In addition fully closed intervals must be dealt with differently than half-closed ones. Half-closed IntervalsUse the RealRange function to define a half-closed interval: evalb(($RESPONSE)=(RealRange(Open(-2),1))); will mark (-2,1] as correct. Notice that the default endpoint in RealRange is closed. For the open endpoint use the Open(..) function. The exception of course is an infinite endpoint: RealRange(2,infinity) is [2, Fully closed IntervalsUnfortunately RealRange(1,2) is NOT taken as the interval [1,2] in Mobius (it is in Maple). I suspect it has something to do with it being taken as a List. However that is the way to deal with this case. For and answer of [a,b] use the following:
A:=convert($RESPONSE,list); Displaying AnswersYou 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)")); For a fully closed interval quotes are not needed: printf(MathML[ExportPresentation]([a,b])) |
| Maple Grading Issues Index | Last updated: 2024/07/02 SS/DAG |