Creating Self Checking Tables with ordered Pairs

I would like for this table to be self checking when students put in their answers. How do I code that in the CL?

Use correct:

I’ll just mention @Daniel_Grubbs because he can do much more.

Hey Cerylla!
Thanks for your post! I put together this screen based on your attached screenshot. I kept it pretty basic as I wasn’t exactly sure how you wanted the points to be checked. This of course can be done more simply if needed or can be built up to be more robust.

I did use some list functions that have been discussed here on the CL forum, so please let me know if you have any questions about those. Keep in mind that these are still in beta, so some of their functionality may change in the future.
I also set some error messaging so that the table will only accept ordered pairs and will give a warning message on the student dashboard otherwise.

I am doing something similar but your screen is another language to me so don’t know what to change for my situation. This is my table and I want to show the x and y values from table as an ordered pair in the 3rd column automatically are correct or incorrect. This is what I have so far


It would be helpful if you just sent us the link to the activity instead of just providing screenshot, but I will see what I can do.

Ok. You can just include what @ClayRehmel had in his example (I changed the names of some stuff but it is the same idea)

# assume 'points' is the list of ordered pairs the student has set, and this list is defined 
# elsewhere in the code
# remember to use this you need to use parseOrderedPair()

# isPoint makes sure that the point entered is actually a point
isCorrect = points.map( (p, e) => isPoint[e] and studentX[e] = correctX[e] and studentY[e] = correctY[e])
check = isCorrect.all((c) => c) # make sure every boolean that isCorrect produces is TRUE
correct: check

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.