With this evaluation type, you can type your own Maxima code in the Definition field to evaluate the student’s answer. The solution/feedback rule will be activated only if the Maxima code returns true
. If you want to use Python code instead of Maxima code, you can use the evaluation type eval python. If you want to use R instead of Maxima, you can use the evaluation type eval R.
The student’s answer can be accessed in two ways.
Use
answer
for the student’s answer in the answer field that belongs to the solution/feedback ruleUse
answers
for a list of student answers of all answer fields. The list starts with index 1. In case an answer value is empty, the list entry for this answer field will be%null
.
Example 1: Check if the student’s answer is a valid integral of sin(x), with or without integration constant.
Example 2: Check if the student’s answer is a binary number.
❗ Note: this Maxima code can be written in many different ways. The code above is just an example.
Documentation on Maxima can be found here. For syntax correction, you can test (parts of) your code in a Maxima interface (for example wxMaxima).
❗ Note that this evaluation type does not have automated feedback.