Hello,
I'm struggling with creating questions that ask students to perform some basic conversion operations between different numeric representations (binary, octal, decimal, hexadecimal, or base N in general). I would also like to create some questions that ask to perform addition of hex numbers, multiplication of U2 binary numbers etc.
What I found is that it is at least not easy due to the following:
printf
function is not supported (probably for security reasons)stackintfmt
variable only affects how the numbers are displayed, not the input interpretation (?)- Maxima
textnumformat
is overriden bystackintfmt
(?) ibase
/obase
are not working as expected (and are discouraged?)
The topic was discussed in the past, but I have not found any recent update on this. Related topics are:
- Moodle forum: Using arbitrary LISP expressions with STACK in moodle (last update in 2019)
- GitHub issue: Add in support for number bases #317 (last update in 2020)
Since I'm new to STACK it may be that I am doing something wrong and the issue has been resolved as of 2022, but I spent a considerable number of hours trying to figure it out, without success.
So I would like to ask if there is a general method to interpret student input as binary, hexadecimal, etc. and use these in generating prt response? If the answer is positive, are there any exemplary questions available?
Regards,
Luke