How can I use and or statement for the when, otherwise

I am trying to copy a domain and range activity on demos - it won’t let me edit and copy. Basically, I want to give the students a domain and range and they need to move the points on a graph so it will fit the given information. I have everything complete, moveable points, and directions but what I cant’ figure out is the when otherwise script to give students feedback about their work.

I feel think I should be able to write something like:
When graph1.number (’“a”) = -4 or 5 “good job” otherwise “try again” I know I would need to do this for multiple parameters, but I can only get it if I take out the or 5 part.

Is this an activity created by Desmos? Can you link me to the activity?

We’re working on bringing some older activities up to date and this one may have slipped through the cracks. It’d be super helpful to the Desmos team, thanks!

You can’t check for two values by just saying -4 or 5. You have to do two different checks…

when graph1.number("a")=-4 or graph1.number("a")=5 ...

1 Like

thanks, I did figure out a way to make it work! I am slowly getting the hang of the code!

Thanks for the heads up! That one should be copy and editable now