Scenario 5 continued

Numeric (continued)

18. The following code validates the user´s interaction. Identify the dot-notation for the result:

function validate(answer, min, max){
  // store the learner´s answer
   SetValue ("cmi.interactions.4. ", answer);

  //check to see if user's answer is correct
  if( answer <= max && answer >= min ){
    //store the result, we store that they got this question correct
     SetValue("cmi.interactions.4. ", " ");
  }
  else{
    // store the result, we only store that they got this question incorrect
     SetValue ("cmi.interactions.4. ", " ");
  }
}

Click Submit after you complete exercise 18.