I would like to check if the values students enter into the table on the last screen really are solutions to the system of equations and have a check mark appear in the dashboard.
I created a c_orrect number in the first graph, then copied that graph through. My hope is that I can use the values in the table to set numbers “a” and “b” in graph1 (screen 9), then on screen 12, I can check to see if “a” and “b” set the value of c_orrect to 1. Ultimately, I would use all of the inequalities, but I’m just testing with the first one. I would then hide all of that work and not display those lines.
Is this the right approach? Can it be tweaked to work?
I have used a template posted for checking values in a table. Every example has integer values assigned to the answer variable. How do I assign an irrational number or for that matter a negative fraction to the answer checking cell?
You mean the parameters in evaluateAt() if I’m understanding correctly. You can use numericValue to directly calculate something as a parameter. You can also use variables you create, which is less messy. Just be careful with irrational and non-terminating variables. You’ll always want to round. Say I already had an equation in terms of x, eq1 and I want to evaluate for pi: n = eq1.evaluateAt(numericValue("\pi"))
n = eq1.evaluateAt(pi)
or a negative fraction: n = eq1.evaluateAt(numericValue("-2/3"))
myFraction = numericValue("-2/3")
n = eq1.evaluateAt(myFraction)
See this other recent thread about comparing values.
Thanks but what I want to do is check whether an irrational number value entered by a student in a table is the correct answer. For instance in the code you posted for “table based automatic checking” your example checks answer1=1. I want to check: answer= \sqrt(2)/2
Right. What I was trying to get across was to use numericValue if you need non-integer.
answer = numericValue("\sqrt(2)/2")
But just recognize with non-terminating decimals comparisons do not always work cleanly and you’ll want to do something similar to the other thread I referenced. Like this anwer rounded to 4 decimal places would be better for comparison: answer = numericValue("\round(\sqrt(2)/2, 4)")
(In my original response to you replace the pi or myFraction with answer.)
Parentheses instead of curly braces for sqrt was probably the main culprit.
Also, I might suggest using cellSuffix to give feedback for each individual cells instead of trying to conditionally change your note so much. Here’s my version. I also used countNumberUsage to ensure students are typing the radical.