drlippman/IMathAS

create an answer option that combines $answerformat = "toconst" and $answerformat = "scalarmult"

Closed this issue · 0 comments

rpruim commented

Another idea from today's workshop.

Basic solution idea:

  1. generate 3 random inputs
  2. evaluate student function (s) and model solution (m) at those inputs. Call those output s1, s2, s3, m1, m2, m3
  3. check that (s2 - s1) / (s3 -s2) is close enough to (m2 - m1) / (m3 - m2)
    • convert to multiplication to avoid division by 0 errors.