Closed YannickNeyt closed 3 years ago
I think I found my mistake: I have to use the accuracy tab to fix this.
Is it possible to let it check all integers between -10 and 10 (once) though?
Marking inequalities is difficult: the standard marking algorithm checks numerically, which doesn't work particularly well for boolean expressions like this.
You can check a fixed set of values with a custom marking algorithm, redefining the vset
note to contain all the values of x
you want to check:
vset:
map(["x": x], x, -10..10)
But that doesn't work when the student has a non-integer on the right hand side of the inequality.
This question is really about the form of the student's answer, so you should use a pattern restriction. A pattern of
x <= (`+- $n);rhs
would check that the student has simplified the inequality as far as you know they can. You can then set Numbas to check only the number part, which will require the student's number to be exactly the same number as in your expected answer.
I've made a copy of your question which does this at https://numbas.mathcentre.ac.uk/question/share/view/e1a6230b-acea-4aea-a57c-68ebf5e296a9
I have an inequality I'd like the students to simplify, but it does something unexpected.
Something like 5>=x also gets marked as correct, while something as -3>=x gets marked as incorrect.
The question itself: https://numbas.mathcentre.ac.uk/question/84481/test-ongelijkheden/