// Numbas version: exam_results_page_options {"name": "Christian's copy of Multiple Pie Charts Question 1", "extensions": ["stats", "jsxgraph", "geogebra", "codewords", "polynomials"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "name": "Christian's copy of Multiple Pie Charts Question 1", "variable_groups": [], "extensions": ["stats", "jsxgraph", "codewords", "polynomials", "visjs", "geogebra"], "parts": [{"displayType": "radiogroup", "scripts": {}, "choices": ["

£{answer}     

", "

£{fakeanswer1}        

", "

£{fakeanswer2}        

", "

£{fakeanswer3}          

", "

£{fakeanswer4}         

"], "variableReplacementStrategy": "originalfirst", "minMarks": 0, "showFeedbackIcon": true, "displayColumns": 0, "shuffleChoices": true, "marks": 0, "distractors": ["", "", "", "", ""], "prompt": "
Breakdown of spending in Jennings Inc. (in percent).
\n

\n

If the increase in sales from last year is £{sales} and wages last year were £{wages}, approximately how much is the marketing bill for this year?

", "showCorrectAnswer": true, "matrix": ["1", 0, 0, 0, 0], "maxMarks": 0, "type": "1_n_2", "variableReplacements": []}], "variables": {"fakeanswer1": {"templateType": "anything", "name": "fakeanswer1", "description": "", "definition": "precround(aa*answer,2)", "group": "Ungrouped variables"}, "cc": {"templateType": "anything", "name": "cc", "description": "", "definition": "random(0.7..1.3#0.01 except 1 except aa except bb)", "group": "Ungrouped variables"}, "yo9": {"templateType": "anything", "name": "yo9", "description": "", "definition": "random(41..70#1 except yo5 except yo6 except yo7 except yo8)", "group": "Ungrouped variables"}, "d": {"templateType": "anything", "name": "d", "description": "", "definition": "random(1.1..1.3#0.01 except a except b except c)", "group": "Ungrouped variables"}, "yo1": {"templateType": "anything", "name": "yo1", "description": "", "definition": "random(4..10#1 except yo0)", "group": "Ungrouped variables"}, "ii": {"templateType": "anything", "name": "ii", "description": "", "definition": "random(3..6#1)", "group": "Ungrouped variables"}, "yo0": {"templateType": "anything", "name": "yo0", "description": "", "definition": "4//random(4..10#1)", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "name": "b", "description": "", "definition": "random(1.1..1.3#0.01 except a)", "group": "Ungrouped variables"}, "fakeanswer2": {"templateType": "anything", "name": "fakeanswer2", "description": "", "definition": "precround(bb*answer,2)", "group": "Ungrouped variables"}, "yo": {"templateType": "anything", "name": "yo", "description": "

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

", "definition": "repeat(random(-5..5),5)", "group": "Ungrouped variables"}, "increase": {"templateType": "anything", "name": "increase", "description": "", "definition": "random(10..40#5)", "group": "Ungrouped variables"}, "aa": {"templateType": "anything", "name": "aa", "description": "", "definition": "random(0.7..1.3#0.01 except 1)", "group": "Ungrouped variables"}, "yo3": {"templateType": "anything", "name": "yo3", "description": "", "definition": "100-yo1-yo2-yo0", "group": "Ungrouped variables"}, "answer": {"templateType": "anything", "name": "answer", "description": "", "definition": "precround((wages/(yo2/100)*yo3/100 + sales)/yo8*yo7,2)", "group": "Ungrouped variables"}, "yo8": {"templateType": "anything", "name": "yo8", "description": "", "definition": "100-yo5-yo6-yo7", "group": "Ungrouped variables"}, "xo": {"templateType": "anything", "name": "xo", "description": "

original x values

", "definition": "list(-2..2)", "group": "Ungrouped variables"}, "yo6": {"templateType": "anything", "name": "yo6", "description": "", "definition": "random(4..10#1 except yo5)", "group": "Ungrouped variables"}, "students": {"templateType": "anything", "name": "students", "description": "", "definition": "random(120..320#1)", "group": "Ungrouped variables"}, "year": {"templateType": "anything", "name": "year", "description": "", "definition": "yearvector[ii]", "group": "Ungrouped variables"}, "fakeanswer4": {"templateType": "anything", "name": "fakeanswer4", "description": "", "definition": "precround(dd*answer,2)", "group": "Ungrouped variables"}, "fakeanswer3": {"templateType": "anything", "name": "fakeanswer3", "description": "", "definition": "precround(cc*answer,2)", "group": "Ungrouped variables"}, "answervector": {"templateType": "anything", "name": "answervector", "description": "", "definition": "vector((yo5-yo0)/yo0*100, (yo6-yo1)/yo1*100,(yo7-yo2)/yo2*100,(yo8-yo3)/yo3*100, (yo9-yo4)/yo4*100)", "group": "Ungrouped variables"}, "bb": {"templateType": "anything", "name": "bb", "description": "", "definition": "random(0.7..1.3#0.01 except 1 except aa)", "group": "Ungrouped variables"}, "percent": {"templateType": "anything", "name": "percent", "description": "", "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)", "group": "Ungrouped variables"}, "yo2": {"templateType": "anything", "name": "yo2", "description": "", "definition": "random(10..20#1)", "group": "Ungrouped variables"}, "yo4": {"templateType": "anything", "name": "yo4", "description": "", "definition": "random(20..40#1 except yo1 except yo0 except yo2 except yo3)", "group": "Ungrouped variables"}, "yo5": {"templateType": "anything", "name": "yo5", "description": "", "definition": "random(4..10#1)", "group": "Ungrouped variables"}, "wages": {"templateType": "anything", "name": "wages", "description": "", "definition": "random(5000..20000#1000)", "group": "Ungrouped variables"}, "yo7": {"templateType": "anything", "name": "yo7", "description": "", "definition": "random(10..20#1)", "group": "Ungrouped variables"}, "yo51": {"templateType": "anything", "name": "yo51", "description": "", "definition": "eee*yo5", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "name": "c", "description": "", "definition": "random(1.1..1.3#0.01 except a except b)", "group": "Ungrouped variables"}, "eee": {"templateType": "anything", "name": "eee", "description": "", "definition": "random(1.1..1.3#0.01 except a except b except c except d)", "group": "Ungrouped variables"}, "f": {"templateType": "anything", "name": "f", "description": "", "definition": "random(1.1..1.3#0.01 except a except b except c except d except e)", "group": "Ungrouped variables"}, "yo41": {"templateType": "anything", "name": "yo41", "description": "", "definition": "d*yo4", "group": "Ungrouped variables"}, "yearvector": {"templateType": "anything", "name": "yearvector", "description": "", "definition": "vector(2007,2008,2009,2010,2011,2012,2013)", "group": "Ungrouped variables"}, "a": {"templateType": "anything", "name": "a", "description": "", "definition": "random(1.1..1.3#0.01)", "group": "Ungrouped variables"}, "dd": {"templateType": "anything", "name": "dd", "description": "", "definition": "random(0.7..1.3#0.01 except 1 except aa except bb except cc)", "group": "Ungrouped variables"}, "sales": {"templateType": "anything", "name": "sales", "description": "", "definition": "random(15000..40000#1000)", "group": "Ungrouped variables"}}, "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Widget Sales

"}, "tags": [], "preamble": {"css": "", "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 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 \n var div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[-10.5,10.5,10.5,-10.5], axis:false, grid:false});\n \n $(question.display.html).find('#dragpoint').append(div);\n \n var board = div.board;\n \n board.suspendUpdate();\n\n var leg1 = board.create('point',[-0.5,-4.5],{name:'tax',fixed:true,size:6,color:'#0F408D', face:'square', label:{offset:[9,6]}});\n var leg2 = board.create('point',[-0.5,-5.5],{name:'marketing',fixed:true,size:6,color:'#6F1B75', face:'square', label:{offset:[9,6]}});\n var leg3 = board.create('point',[-0.5,-6.5],{name:'wages',fixed:true,size:6,color:'#CA147A', face:'square', label:{offset:[9,6]}});\n var leg4 = board.create('point',[-0.5,-7.5],{name:'sales',fixed:true,size:6,color:'#DA2228', face:'square', label:{offset:[9,6]}});\n \ndebugger; \n var a = board.create('chart', [[1,2,3,4],[yo0,yo1,yo2,yo3]], {chartStyle:'pie',labels:[yo0,yo1,yo2,yo3],label: {offset: [-4,-4]},colors:['#0F408D','#6F1B75','#CA147A','#DA2228'], width:1,fillOpacity:1,center:[-5,0],strokeColor:'black',strokeWidth:1, highlightOnSector:true, \n highlightBySize:true});\n var b = board.create('chart', [[1,2,3,4],[yo5,yo6,yo7,yo8]], {chartStyle:'pie',labels:[yo5,yo6,yo7,yo8],label: {offset: [-4,-4]},colors:['#0F408D','#6F1B75','#CA147A','#DA2228'], width:1,fillOpacity:1,center:[5,0], strokeColor:'black', strokeWidth:1, highlightOnSector:true, \n highlightBySize:true});\n\n \n var txt = board.create('text',[-6.5,7, 'Last Year'], {fontSize:18});\n \n var txt1 = board.create('text',[3.5,7, 'This Year'], {fontSize:18});\n \n\n}\n\nquestion.signals.on('HTMLAttached',function() {\n dragpoint_board();\n});"}, "advice": "", "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "", "ungrouped_variables": ["yo", "xo", "yo0", "yo1", "yo2", "yo3", "yo4", "yo6", "yo7", "yo8", "yo9", "yo41", "yo5", "yo51", "a", "b", "c", "d", "eee", "f", "answer", "fakeanswer1", "fakeanswer2", "fakeanswer3", "fakeanswer4", "aa", "bb", "cc", "dd", "percent", "students", "yearvector", "ii", "year", "answervector", "increase", "sales", "wages"], "rulesets": {"std": ["all", "fractionNumbers"]}, "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}