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
answerfor the student’s answer in the answer field that belongs to the solution/feedback ruleUse
answersfor 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.
Documentation on Maxima can be found here. For syntax correction, you can test (parts of) your code in a Maxima interface (for example wxMaxima).
More on evaluation types
An overview of all evaluation types can be found here (for mathematical answers) and here (for text-based answers). More detail on the different fields of a feedback rule can be found here.