Self-checking with radicals

We are going to be simplifying radicals and was curious to know if there is a way using the computation layer to do self-checking with radicals. I have seen how to do it with numerical values and with ordered pairs (Joce Dagenais has an intro to self checking using CL activity that I’ve looked through and tried some of those applied to square roots), but haven’t been successful at finding anything for square roots. Has anyone some suggestions for me?
thanks for any and all help!

2 Likes

This was posted in another thread. Does that help?

1 Like

I will check this out–thank you… I’m very limited in my coding abilities, so words like “parse” freak me out a little. :slight_smile:

1 Like

Basically, means splitting into parts. So, “parsing a fraction” was identifying the numerator and denominator, and for a radical, identifying the coefficient and radicand.

1 Like

This is a great tool, but not exactly what I’m looking for. What I’d like to be able to do is give them a radical (sometimes in fraction form so they learn to rationalize the denominator as well) and then want to be able to give them feedback on whether their answer was correct or not. Here’s the link to an example of what I’d like my questions to look like https://teacher.desmos.com/activitybuilder/custom/5ff748c7d65ecf33f30aeccb and a link to an example of what I’d like it to look like if they are correct or incorrect https://teacher.desmos.com/activitybuilder/custom/5ff74a9ecc474734b0fcc757 I don’t know if it’s possible, but if anyone knows how, I’d love to know how to make it work.
thanks!

Megan Spooner
East High School
Mathematics

2 Likes

Fairly easy (maybe not simple) if you aren’t randomizing anything. So \sqrt{48} for example:
In the math input CL:

check= this.numericValue<=6.93 and this.numericValue>6.92 
and countNumberUsage(this.latex,4)=1 and countNumberUsage(this.latex,3)=1
correct: check

First line checks that it’s the correct value (I’m using a range because it’s a non-terminating decimal). Second checks that the number 4 occurs once and 3 occurs once. You can use the same strategy for fraction forms.
Then, in your note CL:

feedback= when not(inputName.submitted) ""
          when inputName.script.check "Correct text"
          otherwise "Incorrect text"

Then (not in the CL), click the {#} button to insert “feedback” into your note text.

1 Like

Thank you so much! I will give this a try. I appreciate your help and explanations. Just to clarify–if I were asking them to simplify sqrt 63, the second line of the CL text would be:


and countNumberUsage(this.latex,3)=1 and countNumberUsage(this.latex,7)=1

1 Like

Yes. And if you’ve got repeat values say sqrt 8
countNumberUsage(this.latex,2)=2

1 Like

And if it was sqrt 88…what then???

1 Like

It’s searching for numbers not digits, so:

and countNumberUsage(this.latex,2)=1 and countNumberUsage(this.latex,22)=1

Also, countNumberUsage only takes positive parameters, so the above would accept both, 2sqrt22 and -2sqrt22, but the ambiguity should get handled with the decimal check.

1 Like

This is so helpful–thank you so much! I love CL but have absolutely no background in coding and I’m an old fart, so I’m really trying and I appreciate people like you (and others in this forum) being willing to help people like me!

2 Likes

If I could ask one more question… If I were trying to have them rationalize something like 5/sqrt 3, how would the second line of coding look?

and countNumberUsage(this.latex,2)=1 and countNumberUsage(this.latex,22)=1

Do I have to tell it to look for certain numbers in the numerator and the denominator? How do I do a square root in this situation?

Megan Spooner
East High School
Mathematics

Do you want to check that all three numbers are reduced like this?

image

Yes—that’s exactly what I’m looking for!

You don’t need to distinguish where any number is or what operation is being performed, just how many are there, so 5sqrt3/3 would be:

and countNumberUsage(this.latex,3)=2 and countNumberUsage(this.latex,5)=1

And just FYI, if you leave the second parameter out, it just counts how many numbers are used, so if you were concerned about extra stuff that somehow still evaluates the same:
...and countNumberUsage(this.latex)=3 would ensure there are only 3 numbers used.

Awesome! Thank you so much!

This is great! Is there a way to self-check radicals in a table?

Just replace this.latex with your table cells. You may need to alter slightly.

...and countNumberUsage(this.cellContent(1,2),3)=2 ...

If that doesn’t work:

...and countNumberUsage(`${this.cellContent(1,2)}`,3)=2 ...

Hi! I am trying to do something similar, but I want to check their breakdown of a radical and their final simplified radical - each in a different cell. I’m tried a bunch of different forums and have copied and pasted code to no success.

Here is my activity…I’m looking for help to start on slide 5.

Any help is greatly appreciated! Coding was never my strenght!

Because you are checking for correct and specific form, you could get away with just checking the LaTeX. I wrote code for just a few cells, assuming you wanted to give students feedback. If you add this to your CL:

chk23=this.cellContent(2,3)=`2\sqrt{3}`
chk32=this.cellContent(3,2)=`\sqrt{9}\sqrt{3}`
chk33=this.cellContent(3,3)=`2\sqrt{3}`
cellSuffix(2,3): 
when (this.cellHasFocus(2,3) or this.cellContent(2,3)="") "" 
when chk23 "✔️" otherwise "👎" 
cellSuffix(3,2): 
when (this.cellHasFocus(3,2) or this.cellContent(3,2)="") "" 
when chk23 "✔️" otherwise "👎" 
cellSuffix(3,3): 
when (this.cellHasFocus(3,3) or this.cellContent(3,3)="") "" 
when chk23 "✔️" otherwise "👎" 
correct: chk23 and chk32 and chk33

the result will be:
image

Note that the recommended form is to do as Daniel_Grubbs suggested, so using chk23 as an example, you would need:

chk23=this.cellNumericValue(2,3)>3.46 and this.cellNumericValue(2,3)<3.47 and countNumberUsage(this.cellContent(2,3),2)=1 and countNumberUsage(this.cellContent(2,3),3)=1

instead of

chk23=this.cellContent(2,3)=`2\sqrt{3}`

The cellsuffix and correct sinks would not need any changes. Using just LaTeX to check will mark answers incorrect if they add anything, even a multiplication sign.