rawExpression alternative?

I have been working with the CL all summer and it turns out that I cannot copy many of the activities that I’ve created because I used rawExpression frequently in the graph layer.

Many times I’ve use it with a conditional for a multiple choice (and example would be #7, 8 , 9 in activity IM Alg 1 Unit 1 Lesson 13: More Standard Deviation • Activity Builder by Desmos )

Does anybody have some advice of an alternative command that I could use to graph from a conditional statement?

We can’t copy and edit this because of the deprecated code. We’d need a screenshot to see the CL, or at least a more specific description of your goal. It doesn’t look like you’re graphing anything a student enters. If so, then it’s pretty simple. Create a numerical value in the graph component conditional upon which multiple choice is selected.

number("n") : when yourMCName.isSelected(1) 1 
       when yourMCName.isSelected(2) 2
otherwise 0

Then, for the first function in the graph add the condition {n=1}. Similar for the second.

I’m not sure why you’d need rawExpression without seeing it.

I think you need to use colon rather than equals there, though, i.e. number("n") : when ...

Thanks Daniel,

I’m sure I don’t need rawExpression, but that’s what I found to get the job done and now I’m scrambling.

In the activity I used rawExpression to create lists, boxplots, and lines. It looks to me like I probably could create my intended result a lot easier with a number conditional - thanks!

when i7.isSelected(1) "x=10742" otherwise "" 
rawExpressionColor("a"): "red"
rawExpression("b"): when i7.isSelected(1) "x=10457" otherwise "" 
rawExpressionColor("b"): "blue"
rawExpression("c"): when i7.isSelected(2) "x=10909" otherwise "" 
rawExpressionColor("c"): "red"
rawExpression("d"): when i7.isSelected(2) "x=10497" otherwise "" 
rawExpressionColor("d"): "blue"
rawExpression("e"): when i7.isSelected(4) "L=\left[10909-2000,10909-1072.5,10909,10909+1072.5,10909+2000\right]" otherwise "" 
rawExpression("f"): when i7.isSelected(4) "M=\left[10497-2000,10497-997,10497,10497+997,10497+2000\right]" otherwise ""
rawExpression("g"): when i7.isSelected(3) "y=2\left\{10742-1213\le x\le10742+1213\right\}" otherwise "" 
rawExpressionColor("g"): "red"
rawExpression("h"): when i7.isSelected(3) "y=1\left\{10457-1379\le x\le10457+1379\right\}" otherwise "" 
rawExpressionColor("h"): "blue"

That worked well - thank you!

Oops. Fixed it. Thanks.

1 Like