# more robust programming of alternate correct responses (maple-graded) browsing

• I have an exam that consists of a lot of maple-graded question types, in which a student needs to type a formula like for instance: 2*Pi*R*t*L*rho. This response is case sensitive. In order to grade the student's response correctly, and automatically compensate for responses being graded incorrect due to case sensitivity, I need to define alternatives like 2*pi*r*t*l*rho (and all the 'in between possibilities that arise).

Now I have to define all these alternatives in the algorithm and in the grading code. Is there a simple way to declare (in the algorithm or somewhere else) that Pi=pi, R=r and L=l, so I only have to define (and grade) one correct answer instead of 8 possibilities. Especially because in that same QD-question I have multiple response fields that could use the same 'declaration'.

 in algorithm in grading code  • You can use Maple's StringTools library to convert both the response and teachers answer to lower case before comparing them. You then need to parse the lowercase string to turn it back into math.

evalb(parse(StringTools:-LowerCase("$RESPONSE"))=parse(StringTools:-LowerCase("$TA")))

$TA = "2*Pi*R*t*L*rho";  Note, make sure you use text entry mode with this as the symbolic editor is weird with Pi. • @Robert-Stanyon Thanks, this saves me a lot of time • Tried to use the solution. I found that there was a small mistake the gradiing code should be without the quotes evalb(parse(StringTools:-LowerCase($RESPONSE))=parse(StringTools:-LowerCase($TA))) but though Maple accepts the code, MapleTA does not. It works in TA if for example$TA = "R", but as soon as I add the multiplication - sign ($TA="R*L"), the code breaks in MapleTA. • @Metahofzicht I'd suggest making sure the Algorithm preview runs, and then change the grading code back. The quotes are required in order for Maple to recognize$RESPONSE and $TA as strings: resp:="$RESPONSE";