// Numbas version: exam_results_page_options {"name": "Plot Graph", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "advice": "", "parts": [{"displayType": "radiogroup", "distractors": ["", "", "", "", ""], "maxMarks": 0, "marks": 0, "minMarks": 0, "choices": ["

{answer}%          

", "

{fakeanswer1}%          

", "

{fakeanswer2}%          

", "

{fakeanswer3}%          

", "

{fakeanswer4}%          

"], "shuffleChoices": true, "displayColumns": 0, "matrix": [0, 0, 0, 0, 0], "showCorrectAnswer": true, "showFeedbackIcon": true, "prompt": "
Widget Production Jan - June 1982
\n

red line represents the TOTAL (standard plus rejects)

\n

blue line represents standard quality

\n

What was the percentage of rejects in February?

", "type": "1_n_2", "variableReplacements": [], "scripts": {}, "variableReplacementStrategy": "originalfirst"}], "extensions": ["jsxgraph"], "variable_groups": [], "statement": "", "name": "Plot Graph", "tags": [], "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", "e", "f", "answer", "fakeanswer1", "fakeanswer2", "fakeanswer3", "fakeanswer4", "aa", "bb", "cc", "dd"], "preamble": {"css": "table#values th {\n background: none;\n text-align: center;\n}", "js": "function dragpoint_board() {\n var scope = question.scope;\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 \n var yo01 = scope.variables.yo01.value;\n var yo11 = scope.variables.yo11.value;\n var yo21 = scope.variables.yo21.value;\n var yo31 = scope.variables.yo31.value; \n var yo41 = scope.variables.yo41.value;\n var yo51 = scope.variables.yo51.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.4,maxy,7,-0.8], grid:false});\n \n $(question.display.html).find('#dragpoint').append(div);\n \n var board = div.board;\n \n //create stationary points\n \n var op0 = board.create('point',[1,yo0],{name:'January',fixed:true,size:3,color:'blue',face:'diamond'});\n var op1 = board.create('point',[2,yo1],{name:'February',fixed:true,size:3,color:'blue',face:'diamond'});\n var op2 = board.create('point',[3,yo2],{name:'March',fixed:true,size:3,color:'blue',face:'diamond'});\n var op3 = board.create('point',[4,yo3],{name:'April',fixed:true,size:3,color:'blue',face:'diamond'});\n var op4 = board.create('point',[5,yo4],{name:'May',fixed:true,size:3,color:'blue',face:'diamond'});\n var op5 = board.create('point',[6,yo5],{name:'June',fixed:true,size:3,color:'blue',face:'diamond'});\n \n var op01 = board.create('point',[1,yo01],{name:'January',fixed:true,size:3,color:'red',face:'diamond'});\n var op11 = board.create('point',[2,yo11],{name:'February',fixed:true,size:3,color:'red',face:'diamond'});\n var op21 = board.create('point',[3,yo21],{name:'March',fixed:true,size:3,color:'red',face:'diamond'});\n var op31 = board.create('point',[4,yo31],{name:'April',fixed:true,size:3,color:'red',face:'diamond'});\n var op41 = board.create('point',[5,yo41],{name:'May',fixed:true,size:3,color:'red',face:'diamond'});\n var op51 = board.create('point',[6,yo51],{name:'June',fixed:true,size:3,color:'red',face:'diamond'});\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 \n var parabool11 = board.create('line',[[x1=1,y1=yo01], [x2=2,y2=yo11]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'red'});\n var parabool21 = board.create('line',[[x1=2,y1=yo11], [x2=3,y2=yo21]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'red'});\n var parabool31 = board.create('line',[[x1=3,y1=yo21], [x2=4,y2=yo31]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'red'});\n var parabool41 = board.create('line',[[x1=4,y1=yo31], [x2=5,y2=yo41]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'red'});\n var parabool51 = board.create('line',[[x1=5,y1=yo41], [x2=6,y2=yo51]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'red'});\n}\n\nquestion.signals.on('HTMLAttached',function() {\n dragpoint_board();\n});"}, "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {"std": ["all", "fractionNumbers"]}, "variables": {"yn": {"name": "yn", "definition": "map(vsc*y+vsh,y,yo)", "group": "Ungrouped variables", "templateType": "anything", "description": "

new y values after the transformation

"}, "c": {"name": "c", "definition": "random(1.1..1.5#0.01 except a except b)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "yo2": {"name": "yo2", "definition": "random(5..12#0.1 except yo0 except yo1)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "answer": {"name": "answer", "definition": "precround((yo11-yo1)/yo11*100,2)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "vsh": {"name": "vsh", "definition": "if(selector='vsh',random(-3..3#0.5 except 0),0)\n", "group": "Ungrouped variables", "templateType": "anything", "description": "

vertical shift

"}, "aa": {"name": "aa", "definition": "random(0.7..1.3#0.01 except 1)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "bb": {"name": "bb", "definition": "random(0.7..1.3#0.01 except 1 except aa)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "yo21": {"name": "yo21", "definition": "b*yo2", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "a": {"name": "a", "definition": "random(1.1..1.5#0.01)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "yo01": {"name": "yo01", "definition": "f*yo0", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "yo11": {"name": "yo11", "definition": "a*yo1", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "hsc": {"name": "hsc", "definition": "if(selector='hsc',random(-2,-1,-0.5,0.5,2),1)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "maxx": {"name": "maxx", "definition": "max(map(abs(a),a,xn)+5)+1", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "d": {"name": "d", "definition": "random(1.1..1.5#0.01 except a except b except c)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "f": {"name": "f", "definition": "random(1.1..1.5#0.01 except a except b except c except d except e)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "yo5": {"name": "yo5", "definition": "random(4..12#0.1 except yo0 except yo1 except yo2 except yo3 except yo4)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "maxvector": {"name": "maxvector", "definition": "vector(yo1, yo2,yo3, yo4, yo5, yo11, yo21,yo31, yo41, yo51)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "b": {"name": "b", "definition": "random(1.1..1.5#0.01 except a)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "selector": {"name": "selector", "definition": "'vsc'", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "maxy": {"name": "maxy", "definition": "max(list(maxvector)) + 1", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "xo": {"name": "xo", "definition": "list(-2..2)", "group": "Ungrouped variables", "templateType": "anything", "description": "

original x values

"}, "yo0": {"name": "yo0", "definition": "random(5..12#0.1)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "e": {"name": "e", "definition": "random(1.1..1.5#0.01 except a except b except c except d)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "vsc": {"name": "vsc", "definition": "if(selector='vsc',random(-2,-1,-0.5,0.5,2),1)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "yo31": {"name": "yo31", "definition": "c*yo3", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "yo4": {"name": "yo4", "definition": "random(5..12#0.1 except yo0 except yo1 except yo2 except yo3)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "yo3": {"name": "yo3", "definition": "random(5..12#0.1 except yo0 except yo1 except yo2)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "yo": {"name": "yo", "definition": "repeat(random(-5..5),5)", "group": "Ungrouped variables", "templateType": "anything", "description": "

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

"}, "xn": {"name": "xn", "definition": "map((x-hsh)/hsc,x,xo)", "group": "Ungrouped variables", "templateType": "anything", "description": "

new transformed x values

"}, "dd": {"name": "dd", "definition": "random(0.7..1.3#0.01 except 1 except aa except bb except cc)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "yo41": {"name": "yo41", "definition": "d*yo4", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "yo51": {"name": "yo51", "definition": "e*yo5", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "fakeanswer3": {"name": "fakeanswer3", "definition": "precround(cc*answer,2)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "fakeanswer1": {"name": "fakeanswer1", "definition": "precround(aa*answer,2)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "hsh": {"name": "hsh", "definition": "if(selector='hsh',random(-3..3 except 0),0)", "group": "Ungrouped variables", "templateType": "anything", "description": "

horizontal shift

"}, "fakeanswer2": {"name": "fakeanswer2", "definition": "precround(bb*answer,2)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "cc": {"name": "cc", "definition": "random(0.7..1.3#0.01 except 1 except aa except bb)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "yo1": {"name": "yo1", "definition": "random(5..12#0.1 except yo0)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "fakeanswer4": {"name": "fakeanswer4", "definition": "precround(dd*answer,2)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}}, "metadata": {"description": "

of a random cubic spline

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "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/"}]}