New to Desmos CL coding

Hi, as title says I’m new to Desmos CL coding but have done c , python etc previously. So on my journey to learn a new language! I’ve been working on some assignments that self mark and show up as correcct on the teaacher dashboard as well. Using tables to cope with multiple questions of the same type and doing ok. However I’m now doing some indices questions ans am struggling to work out how to mark these. I’ve looked at some activities that already do this but am a bit lost on a couple of things.

First how do you set up so that when students input 3^2 it actually shows up as 3 squared?

Second is there any little snippe of code I can look at and adapt that would do check indices . Below is the code I am using to check answers using cellContent oe CellNumber for a typical slide:

cellContent(1,3): when table8.cellNumericValue(1,2)= 16 “:white_check_mark:” OTHERWISE “N”

cellContent(2,3): when table8.cellNumericValue(2,2)= 12 “:white_check_mark:” OTHERWISE “N”

isCorrect = table8.cellNumericValue(1,2)= 16 and table8.cellNumericValue(2,2)= 12

correct: isCorrect

Here is a snip of what the student slide looks like

At the top of the column in the down arrow menu, you can set to math input.

For tables, you have to code cell by cell. You can potentially import a column into a graph list using the graph CL. You can always hide graphs if you don’t want them visible, but want to perform calculations.

numberList(`L`): table8.columnNumericValues(2)

Then, within the graph you can perform calculations. Like make a list that is your key, and then a list to give points or whatever for corrections. C_heck below is checking if the difference of corresponding elements is zero. If so, it outputs 1 otherwise 0:

1 Like