// Numbas version: finer_feedback_settings {"name": "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": [{"name": "Stem and Leaf plot", "statement": "\n

Construct 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

 

\n \n", "showQuestionGroupNames": false, "extensions": ["stats"], "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

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

\n

rebelmaths

"}, "variable_groups": [], "preamble": {"js": "", "css": ""}, "variables": {"arr1": {"name": "arr1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "map(map(arr[y][p]-10*(y+v),p,0..r[y]-1),y,0..4)"}, "darr1": {"name": "darr1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "map(['$'+(v+y)+'$'+ ':']+arr1[y],y,0..4)"}, "s": {"name": "s", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "flattenint(arr)"}, "v": {"name": "v", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(0..4)"}, "arr": {"name": "arr", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "map(sort(repeat(10*y+random(0..9),r[y-v])),y,v..v+4)"}, "u": {"name": "u", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "map(map(if(p\n\nSTEMLEAF\n$\\var{v}$\n[[0]]\n[[1]]\n[[2]]\n[[3]]\n[[4]]\n\n$\\var{v+1}$\n[[5]]\n[[6]]\n[[7]]\n[[8]]\n[[9]]\n\n$\\var{v+2}$\n[[10]]\n[[11]]\n[[12]]\n[[13]]\n[[14]]\n\n$\\var{v+3}$\n[[15]]\n[[16]]\n[[17]]\n[[18]]\n[[19]]\n\n$\\var{v+4}$\n[[20]]\n[[21]]\n[[22]]\n[[23]]\n[[24]]\n\n\n\n \n", "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "gaps": [{"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[0][0]}", "minValue": "{u[0][0]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[0][1]}", "minValue": "{u[0][1]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[0][2]}", "minValue": "{u[0][2]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[0][3]}", "minValue": "{u[0][3]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[0][4]}", "minValue": "{u[0][4]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[1][0]}", "minValue": "{u[1][0]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[1][1]}", "minValue": "{u[1][1]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[1][2]}", "minValue": "{u[1][2]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[1][3]}", "minValue": "{u[1][3]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[1][4]}", "minValue": "{u[1][4]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[2][0]}", "minValue": "{u[2][0]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[2][1]}", "minValue": "{u[2][1]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[2][2]}", "minValue": "{u[2][2]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[2][3]}", "minValue": "{u[2][3]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[2][4]}", "minValue": "{u[2][4]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[3][0]}", "minValue": "{u[3][0]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[3][1]}", "minValue": "{u[3][1]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[3][2]}", "minValue": "{u[3][2]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[3][3]}", "minValue": "{u[3][3]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[3][4]}", "minValue": "{u[3][4]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[4][0]}", "minValue": "{u[4][0]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[4][1]}", "minValue": "{u[4][1]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[4][2]}", "minValue": "{u[4][2]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[4][3]}", "minValue": "{u[4][3]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}, {"correctAnswerFraction": false, "scripts": {}, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry", "maxValue": "{u[4][4]}", "minValue": "{u[4][4]}", "variableReplacementStrategy": "originalfirst", "marks": 0.2}], "variableReplacementStrategy": "originalfirst", "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n

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'])}

\n \n", "functions": {"flattenint": {"type": "list", "parameters": [["a", "list"]], "language": "javascript", "definition": "\n /*only for integer arrays*/ \n a.toString().split(',').forEach( function (item, k) \n {a[k] = parseInt(item);\n }\n ); \n return a;\n \n"}}, "question_groups": [{"name": "", "pickQuestions": 0, "pickingStrategy": "all-ordered", "questions": []}], "rulesets": {}, "ungrouped_variables": ["arr", "ss", "s", "darr1", "u", "arr1", "v", "r"], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}