Dear Moodle team,
On trying to prepare quizzes on conversion from modern to Roman numerals, I found the following issue:
The programming (as done on a Maxima worksheet) seems quite simple:
Let L be a list of Roman numerals up to, say, 20.
L:[I, II, III, IV, V, VI, VII, VIII, IX, X, XI, XII, XIII, XIV, XV, XVI, XVII, XVIII, XIX, XX]
and let the required answer a be a random number n (from 1 to 20) converted to Roman numerals. That is,
This arrangement works beautifully in Maxima, however, it works partially in a STACK moodle question. That is, writing
L:[I, II, III, IV, V, VI, VII, VIII, IX, X, XI, XII, XIII, XIV, XV, XVI, XVII, XVIII, XIX, XX]
n:rand(20)+1
a:L[n]
gives the right answer for some numbers but not for others (for example, VI, IX, or XX will be accepted correct answers for 6, 9, or 20, but numbers like XVI or XVII will be rejected as invalid answers for 16 or 17).
Will you please tell me what I'm doing wrong, or what, if anything, is wrong, and whether it can be solved somehow.
Yours,
Al