Scientific notation rounding to check answer

Slide 10 when the question ends up to be a repeating decimal answer how can I verify that student has input the correct decimal answer. For example the problem is (1 * 10^7) / (3 * 10^2) the answer is 3.3 * 10^4 it doesn’t seem to be liking the input. Is there a way to put the bar over the 3 in the decimal portion from the math response box OR is there a way to make sure the answer I check against has been rounded to some place value and instruct students to round their answer to that place value as well? I tried round(input, 2) but round is apparently not a function in cl.

I think you had one potential workaround, which is to direct students to round the result they get when dividing the two original coefficients. The use of the rounding CL syntax could look something like preAnswerCoefficient = numericValue("\operatorname{round}\left(${n.script.c1} / ${n.script.c2},2\right)"). I used that on line 12 of the mr6 component on screen 10 and I believe it should help you get students to input an answer that will be recognized as correct.

Thanks. That did exactly what I was looking for. I wish the documentation had a little more information. I searched for “round” and it produced no results. How do you find out which functions, like \operatorname{round}, exist? Where does that come from?

I’ll often type what I want into the expression line of the graphical calculator or math input, copy that input, and then paste it into the CL and it will show you the general syntax for that expression, operator, etc.

All of the operators you can use in the calculator can be used in CL, but not as CL type functions. They have to be included within numericValue(``) or simpleFunction(``). Generally, they’ll either use the operatorName syntax @Scott_Walker used, or just a backslash preceding. I’d also recommend using the fraction notation or parentheses instead of a simple slash since the latex pastes in as-is.

preAnswerCoefficient = numericValue("\round(\frac{${n.script.c1} }{ ${n.script.c2}},2)")

Thanks to you both. This is very helpful.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.