// Numbas version: exam_results_page_options {"name": "Student Grades Question 3", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"hsc": {"templateType": "anything", "name": "hsc", "group": "Ungrouped variables", "definition": "if(selector='hsc',random(-2,-1,-0.5,0.5,2),1)", "description": ""}, "c": {"templateType": "anything", "name": "c", "group": "Ungrouped variables", "definition": "random(1.1..1.3#0.01 except a except b)", "description": ""}, "n4": {"templateType": "anything", "name": "n4", "group": "Ungrouped variables", "definition": "random(10..18 except[n0,n1,n2,n3])", "description": ""}, "yo2": {"templateType": "anything", "name": "yo2", "group": "Ungrouped variables", "definition": "5*n2", "description": ""}, "yo31": {"templateType": "anything", "name": "yo31", "group": "Ungrouped variables", "definition": "c*yo3", "description": ""}, "yo5": {"templateType": "anything", "name": "yo5", "group": "Ungrouped variables", "definition": "5*n5", "description": ""}, "maxy": {"templateType": "anything", "name": "maxy", "group": "Ungrouped variables", "definition": "max(list(maxvector)) + 1", "description": ""}, "secondattemptvector": {"templateType": "anything", "name": "secondattemptvector", "group": "Ungrouped variables", "definition": "vector((n0*m-increase)*5/m, (n1*m-increase)*5/m, (n2*m-increase)*5/m, (n3*m-increase)*5/m, (n4*m-increase)*5/m, (n5*m-increase)*5/m, (n6*m-increase)*5/m)\n", "description": ""}, "hsh": {"templateType": "anything", "name": "hsh", "group": "Ungrouped variables", "definition": "if(selector='hsh',random(-3..3 except 0),0)", "description": "

horizontal shift

"}, "fakeanswer3": {"templateType": "anything", "name": "fakeanswer3", "group": "Ungrouped variables", "definition": "answer-cc*10", "description": ""}, "b": {"templateType": "anything", "name": "b", "group": "Ungrouped variables", "definition": "random(1.1..1.3#0.01 except a)", "description": ""}, "a": {"templateType": "anything", "name": "a", "group": "Ungrouped variables", "definition": "random(1.1..1.3#0.01)", "description": ""}, "selector": {"templateType": "anything", "name": "selector", "group": "Ungrouped variables", "definition": "'vsc'", "description": ""}, "yo41": {"templateType": "anything", "name": "yo41", "group": "Ungrouped variables", "definition": "d*yo4", "description": ""}, "yo21": {"templateType": "anything", "name": "yo21", "group": "Ungrouped variables", "definition": "b*yo2", "description": ""}, "yo1": {"templateType": "anything", "name": "yo1", "group": "Ungrouped variables", "definition": "5*n1", "description": ""}, "aa": {"templateType": "anything", "name": "aa", "group": "Ungrouped variables", "definition": "random(0.7..1.3#0.1 except 1)", "description": ""}, "students": {"templateType": "anything", "name": "students", "group": "Ungrouped variables", "definition": "20*m", "description": ""}, "maxvector": {"templateType": "anything", "name": "maxvector", "group": "Ungrouped variables", "definition": "vector(yo1, yo2,yo3, yo4, yo5, yo11, yo21,yo31, yo41, yo51)", "description": ""}, "fakeanswer4": {"templateType": "anything", "name": "fakeanswer4", "group": "Ungrouped variables", "definition": "answer-dd*10", "description": ""}, "dd": {"templateType": "anything", "name": "dd", "group": "Ungrouped variables", "definition": "random(0.2..0.4#0.1 except 1 except aa except bb except cc)", "description": ""}, "maxx": {"templateType": "anything", "name": "maxx", "group": "Ungrouped variables", "definition": "max(map(abs(a),a,xn)+5)+1", "description": ""}, "xn": {"templateType": "anything", "name": "xn", "group": "Ungrouped variables", "definition": "map((x-hsh)/hsc,x,xo)", "description": "

new transformed x values

"}, "xo": {"templateType": "anything", "name": "xo", "group": "Ungrouped variables", "definition": "list(-2..2)", "description": "

original x values

"}, "vsc": {"templateType": "anything", "name": "vsc", "group": "Ungrouped variables", "definition": "if(selector='vsc',random(-2,-1,-0.5,0.5,2),1)", "description": ""}, "yo0": {"templateType": "anything", "name": "yo0", "group": "Ungrouped variables", "definition": "5*n0", "description": ""}, "vsh": {"templateType": "anything", "name": "vsh", "group": "Ungrouped variables", "definition": "if(selector='vsh',random(-3..3#0.5 except 0),0)\n", "description": "

vertical shift

"}, "yn": {"templateType": "anything", "name": "yn", "group": "Ungrouped variables", "definition": "map(vsc*y+vsh,y,yo)", "description": "

new y values after the transformation

"}, "yo3": {"templateType": "anything", "name": "yo3", "group": "Ungrouped variables", "definition": "5*n3", "description": ""}, "yo4": {"templateType": "anything", "name": "yo4", "group": "Ungrouped variables", "definition": "5*n4", "description": ""}, "n6": {"templateType": "anything", "name": "n6", "group": "Ungrouped variables", "definition": "random(10..18 except[n0,n1,n2,n3,n4,n5])", "description": ""}, "n3": {"templateType": "anything", "name": "n3", "group": "Ungrouped variables", "definition": "random(10..18 except[n0,n1,n2])", "description": ""}, "ii": {"templateType": "anything", "name": "ii", "group": "Ungrouped variables", "definition": "random(3..6#1)", "description": ""}, "n1": {"templateType": "anything", "name": "n1", "group": "Ungrouped variables", "definition": "random(10..18 except[n0])", "description": ""}, "yo11": {"templateType": "anything", "name": "yo11", "group": "Ungrouped variables", "definition": "a*yo1", "description": ""}, "yo6": {"templateType": "anything", "name": "yo6", "group": "Ungrouped variables", "definition": "5*n6", "description": ""}, "n2": {"templateType": "anything", "name": "n2", "group": "Ungrouped variables", "definition": "random(10..18 except[n0,n1])", "description": ""}, "yearvector": {"templateType": "anything", "name": "yearvector", "group": "Ungrouped variables", "definition": "vector(2007,2008,2009,2010,2011,2012,2013)", "description": ""}, "fakeanswer2": {"templateType": "anything", "name": "fakeanswer2", "group": "Ungrouped variables", "definition": "answer+bb*10", "description": ""}, "m": {"templateType": "anything", "name": "m", "group": "Ungrouped variables", "definition": "random(10..30)", "description": ""}, "percent": {"templateType": "anything", "name": "percent", "group": "Ungrouped variables", "definition": "random(5..20#0.1 except 5 except 6 except 7 except 8 except 9 except 10 except 11 except 12 except 13 except 14 except 15 except 16 except 17 except 18 except 19 except 20)", "description": ""}, "n5": {"templateType": "anything", "name": "n5", "group": "Ungrouped variables", "definition": "random(10..18 except[n0,n1,n2,n3,n4])", "description": ""}, "eee": {"templateType": "anything", "name": "eee", "group": "Ungrouped variables", "definition": "random(1.1..1.3#0.01 except a except b except c except d)", "description": ""}, "yo01": {"templateType": "anything", "name": "yo01", "group": "Ungrouped variables", "definition": "f*yo0", "description": ""}, "fakeanswer1": {"templateType": "anything", "name": "fakeanswer1", "group": "Ungrouped variables", "definition": "answer+aa*10", "description": ""}, "yo51": {"templateType": "anything", "name": "yo51", "group": "Ungrouped variables", "definition": "eee*yo5", "description": ""}, "d": {"templateType": "anything", "name": "d", "group": "Ungrouped variables", "definition": "random(1.1..1.3#0.01 except a except b except c)", "description": ""}, "yo": {"templateType": "anything", "name": "yo", "group": "Ungrouped variables", "definition": "repeat(random(-5..5),5)", "description": "

the (random) original y values which relate to the x values

"}, "bb": {"templateType": "anything", "name": "bb", "group": "Ungrouped variables", "definition": "random(0.7..1.3#0.1 except 1 except aa)", "description": ""}, "f": {"templateType": "anything", "name": "f", "group": "Ungrouped variables", "definition": "random(1.1..1.3#0.01 except a except b except c except d except e)", "description": ""}, "n0": {"templateType": "anything", "name": "n0", "group": "Ungrouped variables", "definition": "random(10..18)", "description": ""}, "cc": {"templateType": "anything", "name": "cc", "group": "Ungrouped variables", "definition": "random(0.2..0.4#0.1 except 1 except aa except bb)", "description": ""}, "answer": {"templateType": "anything", "name": "answer", "group": "Ungrouped variables", "definition": "precround(secondattemptvector[ii],2)", "description": ""}, "increase": {"templateType": "anything", "name": "increase", "group": "Ungrouped variables", "definition": "random(60..90#1)", "description": ""}, "year": {"templateType": "anything", "name": "year", "group": "Ungrouped variables", "definition": "yearvector[ii]", "description": ""}}, "functions": {}, "name": "Student Grades Question 3", "preamble": {"css": "table#values th {\n background: none;\n text-align: center;\n}", "js": "function dragpoint_board() {\n var scope = question.scope;\n \n JXG.Options.text.display = 'internal';\n\n var yo0 = scope.variables.yo0.value;\n var yo1 = scope.variables.yo1.value;\n var yo2 = scope.variables.yo2.value;\n var yo3 = scope.variables.yo3.value; \n var yo4 = scope.variables.yo4.value;\n var yo5 = scope.variables.yo5.value;\n var yo6 = scope.variables.yo6.value;\n \n var maxx = scope.variables.maxx.value;\n var maxy = scope.variables.maxy.value;\n \n var div = Numbas.extensions.jsxgraph.makeBoard('500px','500px',{boundingBox:[-0.6,105,8,-4], axis:false, grid:false});\n \n \n $(question.display.html).find('#dragpoint').append(div);\n \n var board = div.board;\n \n var xaxis = board.create('axis', [[0, 0], [7, 0]], {withLabel: true, name: \"Year\", label: {offset: [250,-28]}});\n \n xaxis.removeAllTicks();\n \n board.create('axis', [[0, 0], [0, 20]], {hideTicks:true, withLabel: false, name: \"Percentage\", label: {offset: [-90,300]}});\n \n //create stationary points\n \n var op0 = board.create('point',[1,yo0],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n var op1 = board.create('point',[2,yo1],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n var op2 = board.create('point',[3,yo2],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n var op3 = board.create('point',[4,yo3],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n var op4 = board.create('point',[5,yo4],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n var op5 = board.create('point',[6,yo5],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n var op6 = board.create('point',[7,yo6],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n \n \n var pop0 = board.create('point', [1,0],{name:'2007',fixed:true,size:0,color:'black',face:'diamond', label:{offset:[-20,-8]}});\n var pop1 = board.create('point',[2,0],{name:'2008',fixed:true,size:0,color:'black',face:'diamond', label:{offset:[-20,-8]}});\n var pop2 = board.create('point',[3,0],{name:'2009',fixed:true,size:0,color:'black', face:'diamond', label:{offset:[-15,-8]}});\n var pop3 = board.create('point',[4,0],{name:'2010',fixed:true,size:0,color:'black', face:'diamond', label:{offset:[-15,-8]}});\n var pop4 = board.create('point',[5,0],{name:'2011',fixed:true,size:0,color:'black', face:'diamond', label:{offset:[-10,-8]}});\n var pop5 = board.create('point',[6,0],{name:'2012',fixed:true,size:0,color:'black', face:'diamond', label:{offset:[-15,-8]}});\n var pop6 = board.create('point',[7,0],{name:'2013',fixed:true,size:0,color:'black', face:'diamond', label:{offset:[-15,-8]}});\n \n // create the parabola\n var parabool1 = board.create('line',[[x1=1,y1=yo0], [x2=2,y2=yo1]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool2 = board.create('line',[[x1=2,y1=yo1], [x2=3,y2=yo2]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool3 = board.create('line',[[x1=3,y1=yo2], [x2=4,y2=yo3]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool4 = board.create('line',[[x1=4,y1=yo3], [x2=5,y2=yo4]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool5 = board.create('line',[[x1=5,y1=yo4], [x2=6,y2=yo5]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool5 = board.create('line',[[x1=6,y1=yo5], [x2=7,y2=yo6]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n \n var txt = board.create('text',[-0.35,42, 'Percentage'], {fontSize:14, rotate:90});\n \n}\n\nquestion.signals.on('HTMLAttached',function() {\n dragpoint_board();\n});"}, "tags": [], "variable_groups": [], "advice": "", "parts": [{"maxMarks": 0, "marks": 0, "scripts": {}, "displayType": "radiogroup", "type": "1_n_2", "prompt": "
Student Pass Rate for Module Z
\n

\n

{increase} of the {students} who took the exam in {year} passed on their first attempt. Assuming that the exam has two attempts only, what percent of all the students who took the exam that year passed on the second attempt?

", "distractors": ["", "", "", "", ""], "variableReplacements": [], "showCorrectAnswer": true, "shuffleChoices": true, "matrix": ["1", 0, 0, 0, 0], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "displayColumns": 0, "choices": ["

{answer}%         

", "

{fakeanswer1}%          

", "

{fakeanswer2}%          

", "

{fakeanswer3}%         

", "

{fakeanswer4}%          

"], "minMarks": 0}], "statement": "", "extensions": ["jsxgraph"], "rulesets": {"std": ["all", "fractionNumbers"]}, "ungrouped_variables": ["selector", "vsh", "hsh", "vsc", "hsc", "yo", "yn", "xo", "xn", "yo0", "yo1", "yo2", "yo3", "yo4", "maxx", "maxy", "yo01", "yo11", "yo21", "yo31", "yo41", "yo5", "yo51", "maxvector", "a", "b", "c", "d", "eee", "f", "answer", "fakeanswer1", "fakeanswer2", "fakeanswer3", "fakeanswer4", "aa", "bb", "cc", "dd", "percent", "students", "yo6", "yearvector", "ii", "year", "increase", "n4", "m", "n0", "n1", "n2", "n3", "n5", "n6", "secondattemptvector"], "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Widget Sales

"}, "variablesTest": {"condition": "", "maxRuns": "1000"}, "type": "question", "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}]}], "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}