Checking Correctness of Multiple Ordered List Components

[unfinished] Unit 6 End-of-Unit Review (Honors Geometry) 2023-24 • Activity Builder by Desmos Classroom

On Slide 8 (Question 7), I am trying to have students match the left ordered list with the right ordered list. They are free to re-order the left column to match the right column, or vice versa, or both to get the options to all be sorted correct.

I thought I could use the following CL to check correctness in one of the ordered list components, but it doesn’t seem to be working.

#in q7a ordered list component

correct: correct
correct = is1stCorrect and is2ndCorrect and is3rdCorrect

is1stCorrect = when this.itemAtIndex(1)=1 q7b.itemAtIndex(1)=2
when this.itemAtIndex(1)=2 q7b.itemAtIndex(1)=3
when this.itemAtIndex(1)=3 q7b.itemAtIndex(1)=1
otherwise false

is2ndCorrect = when this.itemAtIndex(2)=1 q7b.itemAtIndex(1)=2
when this.itemAtIndex(2)=2 q7b.itemAtIndex(1)=3
when this.itemAtIndex(2)=3 q7b.itemAtIndex(1)=1
otherwise false

is3rdCorrect = when this.itemAtIndex(3)=1 q7b.itemAtIndex(1)=2
when this.itemAtIndex(3)=2 q7b.itemAtIndex(1)=3
when this.itemAtIndex(3)=3 q7b.itemAtIndex(1)=1
otherwise false

Try something along the lines of:

is1stCorrect = when (this.itemAtIndex(1)=1 and q7b.itemAtIndex(1)=2) true
when (this.itemAtIndex(1)=2 and q7b.itemAtIndex(1)=3) true
when (this.itemAtIndex(1)=3 and q7b.itemAtIndex(1)=1) true
otherwise false

The brackets aren’t strictly necessary, they’re just there to keep it a bit more obvious what goes with what.

Thank you! That did make things more clear. I realized I didn’t updated is2ndCorrect and is3rdCorrect with the correct index.