I am trying to make a self-checking activity where I take the values input from a table and compare them to a latex string but I can’t seem to get this to work. I have the following code inside the CL of the table:
It worked when I used a math input (not a table) and I put an extra \ in front of the ,of the \sqrt (so the first line would be “3+\\sqrt{2}i”). Try that in your table?
We strongly recommend against checking exact latex strings as its very easy to mark students wrong for work they’ve done correctly (even extra white space somewhere will throw it off).
Here’s an alternative using simpleFunction to find the numeric value of the expression. Here, we interpret i as a variable that we can use to evaluate the expression. There are other options as well.
Yup! SimpleFunction defaults to using x as the only variable. If you want to change it he variable or add on, you can list out letters, comma separated, in double quotes.
I have this in the input CL and the correct answer would be -1+ sqrt(3)i but would be entered using math text in the input box.
I can’t seem to get this to work and I see that the correct icon changes to X as soon as I begin typing the answer. I’m trying to evaluate the answer as a function and treat “i” as the variable.
I’m guessing there is an issue with the number of decimal places. I was able to get it to work by using fewer digits. This should also work without needing to type the digits. Basically, it’s comparing the correct answer to the input and seeing if they evaluate to the same amount.
Yes, 4 is the number of decimal places for rounding. You use ${ } in CL to call variables or here the latex entry from student input. If you put input6.latex without the dollar sign and curly brackets, it would just insert that text.
You can insert links, but not embed. Basically, it will display a clickable URL, but you can’t choose your own text and whatnot. I suggest using a URL shortener if it’s a long URL.
I have a slider that allows a movable point on a graph to be dragged around but I want to restrict this to quadrants 1-3. How can I do this? I tried to get the x and y values from the slider in the CL but couldn’t seem to do this.