// Numbas version: finer_feedback_settings {"name": "Construct stem and leaf plot", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"notes": "", "description": "

Given random set of data (between 13 and 23 numbers all less than 100), find their stem-and-leaf plot.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "preamble": {"css": "", "js": ""}, "advice": "

Ordering the data gives:

\n

{table([s],[])}

\n

Splitting into the groups of 10s gives

\n

{table(arr,[])}

\n

Then putting this into stem-and-leaf plot gives

\n

{table(darr1,['STEM'])}

", "rulesets": {}, "question_groups": [{"pickingStrategy": "all-ordered", "name": "", "pickQuestions": 0, "questions": []}], "name": "Construct stem and leaf plot", "ungrouped_variables": ["arr", "ss", "s", "darr1", "u", "arr1", "v", "r"], "showQuestionGroupNames": false, "functions": {"flattenint": {"type": "list", "definition": "/*only for integer arrays*/ \n a.toString().split(',').forEach( function (item, k) \n {a[k] = parseInt(item);\n }\n ); \n return a;", "language": "javascript", "parameters": [["a", "list"]]}}, "tags": ["checked2015", "MAS1403"], "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "variables": {"r": {"name": "r", "definition": "//number of integers in categories\n shuffle([random(1..4),random(4..5),random(3..5),random(3..5),random(2..4)])", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "u": {"name": "u", "definition": "map(map(if(pConstruct a stem-and-leaf plot for the following data. Input all numbers into the fields below.

\n

{table([ss],[])}

\n

 NOTE: All 25 fields have to be filled in. Input -1 if there is no number in a field.

\n

 

\n

 

", "parts": [{"type": "gapfill", "scripts": {}, "marks": 0, "prompt": "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
STEMLEAF
$\\var{v}$[[0]][[1]][[2]][[3]][[4]]
$\\var{v+1}$[[5]][[6]][[7]][[8]][[9]]
$\\var{v+2}$[[10]][[11]][[12]][[13]][[14]]
$\\var{v+3}$[[15]][[16]][[17]][[18]][[19]]
$\\var{v+4}$[[20]][[21]][[22]][[23]][[24]]
", "showCorrectAnswer": true, "gaps": [{"maxValue": "{u[0][0]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[0][0]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[0][1]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[0][1]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[0][2]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[0][2]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[0][3]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[0][3]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[0][4]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[0][4]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[1][0]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[1][0]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[1][1]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[1][1]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[1][2]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[1][2]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[1][3]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[1][3]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[1][4]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[1][4]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[2][0]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[2][0]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[2][1]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[2][1]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[2][2]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[2][2]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[2][3]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[2][3]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[2][4]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[2][4]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[3][0]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[3][0]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[3][1]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[3][1]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[3][2]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[3][2]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[3][3]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[3][3]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[3][4]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[3][4]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[4][0]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[4][0]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[4][1]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[4][1]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[4][2]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[4][2]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[4][3]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[4][3]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}, {"maxValue": "{u[4][4]}", "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "marks": 0.2, "minValue": "{u[4][4]}", "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}