// Numbas version: exam_results_page_options {"name": "Data 5", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"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 var yo7 = scope.variables.yo7.value; \n var yo8 = scope.variables.yo8.value;\n var yo9 = scope.variables.yo9.value; \n var yo10 = scope.variables.yo10.value;\n var yo11 = scope.variables.yo11.value; \n \n var div = Numbas.extensions.jsxgraph.makeBoard('450px','450px',{boundingBox:[-0.2,1450,4,-50], axis:false, grid:false});\n \n $(question.display.html).find('#dragpoint').append(div);\n \n var board = div.board;\n \n var xaxis = board.create('axis', [[0, 0], [3, 0]], {withLabel: false, name: \"Bank\", label: {offset: [250,-30]}});\n \n xaxis.removeAllTicks(); \n \n board.create('axis', [[0, 0], [0, 1400]], {hideTicks:false, withLabel: false, name: \"\", label: {offset: [-110,300]}});\n \n var pop0 = board.create('point', [1,0],{name:'2015',fixed:true,size:0,color:'black',face:'diamond', label:{offset:[-20,-8]}});\n var pop1 = board.create('point',[3,0],{name:'2016',fixed:true,size:0,color:'black',face:'diamond', label:{offset:[-20,-8]}});\n\n var leg1 = board.create('point',[1.8,600],{name:'Children',fixed:true,size:8,color:'#8F1D5E', face:'square', label:{offset:[11,0]}});\n var leg2 = board.create('point',[1.8,700],{name:'Adult',fixed:true,size:8,color:'#9999CC', face:'square', label:{offset:[11,0]}});\n \n var a = board.create('chart', [[1,1,3,3],[yo0,yo2,yo1,yo3]], {chartStyle:'bar',colors:['#DA2228','#6F1B75','#DA2228','#6F1B75'],width:1,fillOpacity:0.6});\n \n var txt1 = board.create('text',[-0.1,500, 'Number of Visitors'], {fontColor:'black', fontSize:14, rotate:90});\n\n}\n\nquestion.signals.on('HTMLAttached',function() {\n dragpoint_board();\n});", "css": "table#values th {\n background: white;\n text-align: center;\n}"}, "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "name": "Data 5", "ungrouped_variables": ["selector", "vsh", "hsh", "vsc", "hsc", "yo", "yn", "xo", "xn", "yo0", "yo1", "yo2", "yo3", "yo4", "maxx", "yo6", "yo7", "yo8", "yo9", "yo10", "yo5", "yo11", "a", "b", "c", "d", "eee", "f", "answer_old", "fakeanswer1", "fakeanswer2", "fakeanswer3", "fakeanswer4", "aa", "bb", "cc", "dd", "percent", "number", "yearvector", "ii", "year", "answervector", "increase", "answer"], "extensions": ["jsxgraph"], "variablesTest": {"condition": "fakeanswer1<100", "maxRuns": "1000"}, "statement": "", "variable_groups": [], "parts": [{"showFeedbackIcon": true, "marks": 0, "showCorrectAnswer": true, "variableReplacements": [], "type": "gapfill", "prompt": "
Number of visitors to Lakesville Theme Park
\n

\n

What percentage of visitors to the theme park in {year} were adults? 

\n

Give your solution correct to two decimal places

\n

[[0]] $\\%$

", "gaps": [{"showFeedbackIcon": true, "marks": 1, "variableReplacements": [], "vsetrange": [0, 1], "type": "jme", "scripts": {}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "checkingtype": "absdiff", "checkvariablenames": false, "showCorrectAnswer": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showpreview": true, "answer": "{answer}"}], "variableReplacementStrategy": "originalfirst", "scripts": {}}], "functions": {}, "rulesets": {"std": ["all", "fractionNumbers"]}, "advice": "", "variables": {"fakeanswer4": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround(dd*answervector[ii],2)", "name": "fakeanswer4"}, "fakeanswer3": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround(cc*answervector[ii],2)", "name": "fakeanswer3"}, "fakeanswer2": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround(bb*answervector[ii],2)", "name": "fakeanswer2"}, "increase": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(10..40#5)", "name": "increase"}, "dd": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.6..1.15#0.01 except 1 except aa except bb except cc)", "name": "dd"}, "answer": {"description": "

answer

", "templateType": "anything", "group": "Ungrouped variables", "definition": "answer_old", "name": "answer"}, "yo9": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(20..40#1 except yo0 except yo3 except yo6)", "name": "yo9"}, "ii": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,1)", "name": "ii"}, "yo": {"description": "

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

", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(-5..5),5)", "name": "yo"}, "selector": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "'vsc'", "name": "selector"}, "yo4": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(20..40#1 except yo1)", "name": "yo4"}, "bb": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.6..1.15#0.01 except 1 except aa)", "name": "bb"}, "eee": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1.1..1.3#0.01 except a except b except c except d)", "name": "eee"}, "d": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1.1..1.3#0.01 except a except b except c)", "name": "d"}, "yn": {"description": "

new y values after the transformation

", "templateType": "anything", "group": "Ungrouped variables", "definition": "map(vsc*y+vsh,y,yo)", "name": "yn"}, "yo1": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(200..700#100 except yo0)", "name": "yo1"}, "vsc": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(selector='vsc',random(-2,-1,-0.5,0.5,2),1)", "name": "vsc"}, "xo": {"description": "

original x values

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

horizontal shift

", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(selector='hsh',random(-3..3 except 0),0)", "name": "hsh"}, "aa": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.6..1.15#0.01 except 1)", "name": "aa"}, "yo6": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(20..40#1 except yo0 except yo3)", "name": "yo6"}, "yo5": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "100-yo3-yo4", "name": "yo5"}, "answervector": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "vector((yo2-yo0)/yo2*100,(yo3-yo1)/yo3*100)", "name": "answervector"}, "f": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1.1..1.3#0.01 except a except b except c except d except e)", "name": "f"}, "b": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1.1..1.3#0.01 except a)", "name": "b"}, "hsc": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(selector='hsc',random(-2,-1,-0.5,0.5,2),1)", "name": "hsc"}, "answer_old": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround(answervector[ii],2)", "name": "answer_old"}, "c": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1.1..1.3#0.01 except a except b)", "name": "c"}, "yo10": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(20..40#1 except yo1 except yo4 except yo7)", "name": "yo10"}, "yo0": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(200..700#100)", "name": "yo0"}, "number": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1000..5000#200)", "name": "number"}, "yo11": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "100-yo10-yo9", "name": "yo11"}, "a": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1.1..1.3#0.01)", "name": "a"}, "yearvector": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "vector(2015,2016)", "name": "yearvector"}, "cc": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(0.6..1.15#0.01 except 1 except aa except bb)", "name": "cc"}, "yo2": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(900..1400#100)", "name": "yo2"}, "xn": {"description": "

new transformed x values

", "templateType": "anything", "group": "Ungrouped variables", "definition": "map((x-hsh)/hsc,x,xo)", "name": "xn"}, "percent": {"description": "", "templateType": "anything", "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)", "name": "percent"}, "fakeanswer1": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround(aa*answervector[ii],2)", "name": "fakeanswer1"}, "yo8": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "100-yo7-yo6", "name": "yo8"}, "vsh": {"description": "

vertical shift

", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(selector='vsh',random(-3..3#0.5 except 0),0)\n", "name": "vsh"}, "year": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "yearvector[ii]", "name": "year"}, "maxx": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "max(map(abs(a),a,xn)+5)+1", "name": "maxx"}, "yo7": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(20..40#1 except yo1 except yo4)", "name": "yo7"}, "yo3": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(900..1400#100 except yo1)", "name": "yo3"}}, "tags": [], "type": "question", "contributors": [{"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}]}]}], "contributors": [{"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}]}