Hey! We want the correct answer to be 2(7) but this answer contains parentheses and messes with the code. How do we set this to be the correct answer?
If you know numbers than create variables
b=7``` and write it as latex:
```${a}\left(${b}\right)```
This should do what you want
Where is the 2 in that latex? I see that b=7 but we are teaching that 2(7) is 2 times 7. I could just be missing the point, but can you clarify?
Iβm guessing you may have used quotation marks. If you change to backticks, that should work better.
Computation is a more stable way of checking, though can be more complex:
check=this.numericValue=14 and countNumberUsage(this.latex,2)=1
and countNumberUsage(this.latex,7)=1
correct: check
The above would check that it evaluates to 14, that there is one 2, and that there is one 7. Note that other acceptable answers would be 7(2)
, 7*2
, and 2*7
, so if you specifically want parentheses, latex matching may be the way to go.
it should be a=2 and b=7.
Then you can play with variables as you like.
{a}\left({b}\right)
if you use just ( and ) then they will not size with your expression.
I am trying to have students work backwards to describe a function notation. I want them to input f(a) into a table in cell (2,1). I have tried following the suggestions on this thread but it doesnβt seem to work for my table. Here is my code I am trying to fix (first row is OK) and here is my activity (slide 33) https://teacher.desmos.com/activitybuilder/custom/6399a42083cd23d3fb4e503e
cellContent(1,3):
when this.cellContent(1,2)=β-3t+5β or this.cellContent(1,2)=β5-3tβ or this.cellContent(1,2)=" -3t+5"and btn5.timeSincePress()>0 ββ
when btn5.timeSincePress()>0 ββ
otherwise ββ
cellContent(2,3):
when this.cellContent(2,1)=β{f}\left({a}\right)β and btn5.timeSincePress()>0 ββ
when btn5.timeSincePress()>0 ββ
otherwise ββ
Thereβs no slide 33. I donβt think youβve published your draft.