Checking if student entered correct linear inequality

Wondering how to get CL to check if the S entered a correct inequality. And thanks to Craig or Daniel for the code for this (sorry I did not note who!).

The CL you’ve got is working correctly - it displays a dot when the student is correct and a cross when the student is wrong. So do you mean…

  1. You want the student to be able to see if they’re right or wrong?
  2. You want a tick to appear instead of a dot? (In which case, add readOnly: true to the two graphs)

I don’t think it is picking up the distinction between, for example, y<x+5 and y≤x+5. Probably can throw in a check for strictly less than, or greater than. Wondering if there is a better way.

Ah, I see. .isStrict is what you’re looking for (or NOT looking for) here:

a2 = not(ineq2.isStrict)

success = a1 and a2

And, knuckelhead here, 1) it was Daniel’s excellent work I copied, 2) he has a checking version later in the deck! It has been a long year! TY

1 Like