Widget:WJG Sandbox: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 1,030: Line 1,030:
qdist=convolve_bernouli(question_probs);
qdist=convolve_bernouli(question_probs);


var myTotal = 0;  //Variable to hold your total


datas += percent + "%<br /><br />Click the Navigation Buttons on the left to review the questions you answered.<br /><br />";
for(var i=0, len=qdist.length; i<len; i++){
    myTotal += qdist[i];  //Iterate over your first array and then grab the second element add the values up
}
 
 
datas += percent + "%<br /><br />Click the Navigation Buttons on the left to review the questions you answered.<br />";
datas += "<br />You scored in the " + myTotal + " percentile. <br /><br />";


datas += "<canvas id='simExams' width='600' height='400'></canvas>";
datas += "<canvas id='simExams' width='600' height='400'></canvas>";

Revision as of 16:41, 24 May 2014