drlippman / IMathAS

IMathAS Online Math Assessment
Other
113 stars 99 forks source link

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

Closed rpruim closed 1 year ago

rpruim commented 1 year ago

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.