@christianp I think the problem is the implicit multiplication.
It's better to be clear. I may, however, be biased since I'm working on a symbolic maths UI (based on Maxima). In it, you are explicit in what you type, such as: a*%pi
, and it will render as: a π. Of course, it's reasonable to allow a user to type a*π
as well, although it's not supported at the moment.
I believe that trying to be "clever" when parsing maths will lead to problems, because no matter how you choose to parse it, a user will always end up being unsure as to exactly how their input was parsed, which is definitely not what you want when doing maths.
Here's an example of my UI: https://peertube.mastodon.host/videos/watch/df751bd5-5a26-44da-90d5-f47624161649
@christianp I would build the assessment into the system itself. In other words, it would show the student how the system has parsed the input. That way it doesn't matter what format you require, since they will see the result displayed before submitting anyway.
@loke that's what it does. The problem is that from a student's perspective, 'xy' could either be a single variable with a two-letter name, or the product of 'x' and 'y'. We even display long variable names in a different font, but they don't pick up on that.
We also show multiplication symbols in the preview, but if you're not expecting to see one, you won't notice it's missing.
@christianp that a goodbye point. In my application, the difference would be how xy is displayed vs x y, which might not be be readily obvious to a beginner.
There is only reliable solution I can think of is to completely disallow multi character symbols and also display the multiplication signs.
@loke yep, that's what my solution looked like until this morning. But is 'pi' a multi-character symbol?
@christianp it would be parsed as pi, yes and displayed as such. It wouldn't be confused with p*i since that would be displayed with the multiplication symbol.
@loke For that to work depends on the student's idea of when symbols should be shown matching the system's.
This is a really frustrating problem, trying to work around users who can't (and shouldn't, for the purpose of the assessment) be relied on to apply the rules you give them
@christianp my idea was based on the fact that two characters will never be displayed next to each other without an operation in between.
@loke yes, but you need the student to understand that. Teachers omit multiplication symbols in their notes or handwritten work, so students do the same.
@loke I agree less ambiguity is better, but this is an assessment system used by maths students at all levels. For years I avoided this implicit multiplication, but it trips up so many students, even if you tell them to always insert multiplication symbols.
My position is that we should do our best to be generous interpreting what the student means.