# New to Desmos CL coding

**URL:** <https://cl.desmos.com/t/new-to-desmos-cl-coding/2903>\
**Category:** Questions\
**Created:** [March 12, 2021, 10:44am UTC](https://cl.desmos.com/t/new-to-desmos-cl-coding/2903 "2021-03-12T10:44:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarnold](https://avatars.discourse-cdn.com/v4/letter/t/c5a1d2/32.png) [@tarnold](https://cl.desmos.com/u/tarnold)\
**Post date:** [March 12, 2021, 10:44am UTC](https://cl.desmos.com/t/new-to-desmos-cl-coding/2903/1 "2021-03-12T10:44:03Z")

</div>

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 “✅” OTHERWISE “N”

cellContent(2,3): when table8.cellNumericValue(2,2)= 12 “✅” 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

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/1/168207c9f5ae5225c28eea1f0e3935a802b4ba17.png)

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [March 12, 2021, 5:44pm UTC](https://cl.desmos.com/t/new-to-desmos-cl-coding/2903/2 "2021-03-12T17:44:47Z")

</div>

> [@tarnold](#):
>
> First how do you set up so that when students input 3^2 it actually shows up as 3 squared?

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

> [@tarnold](#):
>
> Second is there any little snippe of code I can look at and adapt that would do check indices .

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.

```auto
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:

```auto
K_ey=[16,12,8,7]
C_heck={|K_ey-L|=0:1,0}
S_core=total(C_heck)

```
