Help on a specific slide with self-checking

I built this activity to be self-checking, but am having an issue on slide 8 titled “#122c

The answer is 36!/33! but if the students type that into the math input box, it marks it wrong. If they put in 36(35)(34) it is correct, even though, its the same thing. Please help, it is linked below.

Activity

Add this to your condition. It’s probably the scale of the values of the factorials that are leading to something in the way it’s calculated behind the scenes causing the issue:

or simpleFunction(`${this.latex}`).evaluateAt(0) = simpleFunction(`\frac{36!}{33!}`).evaluateAt(0)

Thanks! Unfortunately, that didn’t fix the problem, unless I put it in incorrectly. I can just tell students to use the actual calculator and just put in the answer.

The problem is with large number round off. We see here how the actual result is calculated in Desmos:image

So rather than writing
correct: input8.numericValue = 42840
you could replace with the follow:
check = simpleFunction("\abs(a-b)",“a”,“b”)
correct: check.evaluateAt(input8.numericValue,42840) < 0.01

This is what I put in:

check=simpleFunction("\abs(a-b)",“a”,“b”)
correct: check.evaluateAt(input8.numericValue,4280)<0.01

but it didn’t fix it. It is interesting that it it rounding it off like that! I also tried

correct: input8.numericValue>42839 and input.numericValue<42840
after you said it was rounding, but that didn’t work either.

Thank you for your help!

Worked for me:

I must’ve put something in wrong! Thank you!!

I changed this.latex to input8.latex because I thought “this” was just a place holder… I am learning from my mistakes! Thank you again.

That is for the following reason: You calculate “correct” in the input8 script but you separately calculate the “Great Job” based on another value comparison in the button script. Change the code in your button script and you’ll be on your way.

1 Like

Didn’t see the button. I made a variable “check” in input8, then used input8.script.check in the note instead of re-checking by repeating code. You can also use it in the button if needed.