In building an assignment for my class, I would like set up an InputField
, where they will enter a function. I was wondering if there was a way to "continuously" check if their function is being defined correctly (the thing is, they often forget the underscore after the variables as in f[x_]
, they use ( ) instead of [ ], etc.).
I am imagining some red "X" that becomes a green checkmark when the beginning of the definition is correctly written (similar to the way some websites show you if you've re-entered your password correctly when signing up for an account).
If this seems too complicated, I would even be interested in seeing how to mask something simpler, like perhaps a phone number.
Is this possible in Mathematica?
Thanks!
(With[{# = f[x_]}, argtra := Sin[x]]) &@argtra
$\endgroup$