// Numbas version: exam_results_page_options {"name": "Data 1", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {"std": ["all", "fractionNumbers"]}, "extensions": ["jsxgraph"], "name": "Data 1", "tags": [], "parts": [{"marks": 0, "scripts": {}, "prompt": "
Breakdown of spending (in %) from ABC Inc. 
\n

\n

If last year's sales figures were worth double this year's wages bill and the tax bill for this year is £{tax_bill_for_this_year},  how much was spent on marketing last year?

\n

Give your solution correct to two decimal places.

\n

$£$ [[0]]

", "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"scripts": {}, "variableReplacements": [], "answer": "{answer}", "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme", "showCorrectAnswer": true, "expectedvariablenames": [], "marks": 1, "vsetrangepoints": 5, "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "showpreview": true, "showFeedbackIcon": true, "checkingaccuracy": 0.001}], "showFeedbackIcon": true}], "functions": {}, "variables": {"sales_this": {"definition": "100-tax_this-marketing_this-wages_this", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "sales_this"}, "yo41": {"definition": "d*yo4", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "yo41"}, "yn": {"definition": "map(vsc*y+vsh,y,yo)", "description": "

new y values after the transformation

", "group": "Ungrouped variables", "templateType": "anything", "name": "yn"}, "tax_bill_for_this_year": {"definition": "random(25000..150000 #1000)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "tax_bill_for_this_year"}, "hsh": {"definition": "if(selector='hsh',random(-3..3 except 0),0)", "description": "

horizontal shift

", "group": "Ungrouped variables", "templateType": "anything", "name": "hsh"}, "yo9": {"definition": "random(41..70#1 )", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "yo9"}, "eee": {"definition": "random(1.1..1.3#0.01 except a except b except c except d)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "eee"}, "f": {"definition": "random(1.1..1.3#0.01 except a except b except c except d except e)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "f"}, "d": {"definition": "random(1.1..1.3#0.01 except a except b except c)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "d"}, "yearvector": {"definition": "vector(2007,2008,2009,2010,2011,2012,2013)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "yearvector"}, "selector": {"definition": "'vsc'", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "selector"}, "yo4": {"definition": "random(20..40#1 )", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "yo4"}, "b": {"definition": "random(1.1..1.3#0.01 except a)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "b"}, "students": {"definition": "random(120..320#1)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "students"}, "percent": {"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": "", "group": "Ungrouped variables", "templateType": "anything", "name": "percent"}, "c": {"definition": "random(1.1..1.3#0.01 except a except b)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "c"}, "vsh": {"definition": "if(selector='vsh',random(-3..3#0.5 except 0),0)\n", "description": "

vertical shift

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

original x values

", "group": "Ungrouped variables", "templateType": "anything", "name": "xo"}, "ii": {"definition": "random(3..6#1)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "ii"}, "tax_last": {"definition": "random(4..10#1)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "tax_last"}, "year": {"definition": "yearvector[ii]", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "year"}, "wages": {"definition": "random(5000..20000#1000)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "wages"}, "bb": {"definition": "random(0.7..1.3#0.01 except 1 except aa)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "bb"}, "increase": {"definition": "random(10..40#5)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "increase"}, "answer": {"definition": "precround((({tax_bill_for_this_year}/{tax_this})*2*{wages_this})*({marketing_last}/{sales_last}),2)\n", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "answer"}, "marketing_this": {"definition": "random(4..10#1 except tax_this)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "marketing_this"}, "vsc": {"definition": "if(selector='vsc',random(-2,-1,-0.5,0.5,2),1)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "vsc"}, "wages_last": {"definition": "random(10..20#1)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "wages_last"}, "cc": {"definition": "random(0.7..1.3#0.01 except 1 except aa except bb)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "cc"}, "xn": {"definition": "map((x-hsh)/hsc,x,xo)", "description": "

new transformed x values

", "group": "Ungrouped variables", "templateType": "anything", "name": "xn"}, "tax_this": {"definition": "random(4..10#1 except tax_last)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "tax_this"}, "yo": {"definition": "repeat(random(-5..5),5)", "description": "

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

", "group": "Ungrouped variables", "templateType": "anything", "name": "yo"}, "a": {"definition": "random(1.1..1.3#0.01)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "a"}, "hsc": {"definition": "if(selector='hsc',random(-2,-1,-0.5,0.5,2),1)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "hsc"}, "dd": {"definition": "random(0.7..1.3#0.01 except 1 except aa except bb except cc)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "dd"}, "wages_this": {"definition": "random(10..20#1 )", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "wages_this"}, "sales": {"definition": "random(15000..40000#1000)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "sales"}, "aa": {"definition": "random(0.7..1.3#0.01 except 1)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "aa"}, "maxx": {"definition": "max(map(abs(a),a,xn)+5)+1", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "maxx"}, "sales_last": {"definition": "100-tax_last-marketing_last-wages_last", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "sales_last"}, "marketing_last": {"definition": "random(4..10#1 except tax_last)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "marketing_last"}}, "statement": "", "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["selector", "vsh", "hsh", "vsc", "hsc", "yo", "yn", "xo", "xn", "tax_last", "marketing_last", "wages_last", "sales_last", "yo4", "maxx", "marketing_this", "wages_this", "sales_this", "yo9", "yo41", "tax_this", "a", "b", "c", "d", "eee", "f", "answer", "aa", "bb", "cc", "dd", "percent", "students", "yearvector", "ii", "year", "increase", "sales", "wages", "tax_bill_for_this_year"], "preamble": {"js": "function dragpoint_board() {\n var scope = question.scope;\n\n var tax_last = scope.variables.tax_last.value;\n var marketing_last = scope.variables.marketing_last.value;\n var wages_last = scope.variables.wages_last.value;\n var sales_last = scope.variables.sales_last.value;\n // var yo4 = scope.variables.yo4.value;\n var tax_this = scope.variables.tax_this.value;\n var marketing_this = scope.variables.marketing_this.value;\n var wages_this = scope.variables.wages_this.value; \n var sales_this = scope.variables.sales_this.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 tax_laststring = tax_last.toString();\n var marketing_laststring = marketing_last.toString();\n var wages_laststring = wages_last.toString();\n var sales_laststring = sales_last.toString();\n // var yo4string = yo4.toString();\n var tax_thisstring = tax_this.toString();\n var marketing_thisstring = marketing_this.toString();\n var wages_thisstring = wages_this.toString();\n var sales_thisstring = sales_this.toString();\n // var yo9string = yo9.toString();\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:'#FFF633', 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 \n \n var a = board.create('chart', [[1,2,3,4],[tax_last,marketing_last,wages_last,sales_last]], {chartStyle:'pie',labels:[tax_laststring,marketing_laststring,wages_laststring,sales_laststring],label: {offset: [-4,-4]},colors:['#0F408D','#6F1B75','#FFF633','#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],[tax_this,marketing_this,wages_this,sales_this]], {chartStyle:'pie',labels:[tax_thisstring,marketing_thisstring,wages_thisstring,sales_thisstring],label: {offset: [-4,-4]},colors:['#0F408D','#6F1B75','#FFF633','#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\nquestion.signals.on('HTMLAttached',function() {\n dragpoint_board();\n});", "css": "table#values th {\n background: none;\n text-align: center;\n}"}, "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "variable_groups": [], "advice": "", "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/"}]}