// Numbas version: finer_feedback_settings {"showQuestionGroupNames": false, "feedback": {"showanswerstate": false, "allowrevealanswer": false, "showtotalmark": false, "advicethreshold": 0.0, "showactualmark": false, "enterreviewmodeimmediately": false, "showexpectedanswerswhen": "never", "showpartfeedbackmessageswhen": "never", "showactualmarkwhen": "never", "showtotalmarkwhen": "never", "showanswerstatewhen": "never", "showadvicewhen": "never"}, "name": "Sharika's copy of Numerical reasoning - money", "duration": 0.0, "shufflequestions": true, "navigation": {"showfrontpage": true, "allowregen": false, "preventleave": true, "showresultspage": "never", "browse": true, "onleave": {"action": "none", "message": ""}, "reverse": true}, "question_groups": [{"pickingStrategy": "all-ordered", "name": "", "questions": [{"name": "Numerical reasoning - tax", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "tags": ["income", "money", "numerical reasoning", "percentage", "Percentage", "tax"], "metadata": {"description": "

Given an annual salary, tax allowance, tax rate and pension deduction, work out a person's take-home pay per month.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

{names} has a salary of £{commanumber(salary)} per year.

\n

{capitalise(he)} has a tax allowance of £{commanumber(allowance)} and {he} pays income tax at {tax}% on the rest.

\n

{capitalise(he)} pays into a pension and for this {his} salary is deducted {pension}% after tax has been deducted.

", "advice": "

{names} is only taxed on the amount remaining after taking away the allowance, i.e. $£\\var{commanumber(salary)} - £\\var{commanumber(allowance)} = £\\var{commanumber(salary-allowance)}.$

\n

Income tax is {tax}% on this $£\\var{commanumber(salary-allowance)}$ and is $£\\var{latex(commanumber(salary-allowance))} \\times \\frac{\\var{tax}}{100}  = £\\var{commanumber(taxedincome)}.$

\n

This leaves {names} with $£\\var{commanumber(salary)} - £\\var{commanumber(taxedincome)} = £\\var{commanumber(aftertax)}.$

\n

{pension}% of this is for {his} pension contributions, i.e. $£\\var{commanumber(aftertax)} \\times \\frac{\\var{pension}}{100} = £\\var{commanumber(pensiondeduction)}.$

\n

The amount left is then $£\\var{commanumber(aftertax)} - £\\var{commanumber(pensiondeduction)} = £\\var{commanumber(precround(netincome,2))}.$

\n

The take home pay per month is hence $\\frac{\\var{netincome}}{12} = £\\var{commanumber(incomepermonth)}$, to the nearest penny.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"salary": {"name": "salary", "group": "Ungrouped variables", "definition": "random(18000..50000#1000)", "description": "", "templateType": "anything", "can_override": false}, "aftertax": {"name": "aftertax", "group": "Ungrouped variables", "definition": "salary-taxedincome", "description": "", "templateType": "anything", "can_override": false}, "incomepermonth": {"name": "incomepermonth", "group": "Ungrouped variables", "definition": "precround(netincome/12,2)", "description": "", "templateType": "anything", "can_override": false}, "his": {"name": "his", "group": "Ungrouped variables", "definition": "if(he='he','his','her')", "description": "", "templateType": "anything", "can_override": false}, "names": {"name": "names", "group": "Ungrouped variables", "definition": "if(he='he',random(['Bob','Bill','Ben','Barry']),random(['Bridget','Beth','Bea','Beatrice']))", "description": "", "templateType": "anything", "can_override": false}, "netincome": {"name": "netincome", "group": "Ungrouped variables", "definition": "(allowance+(salary-allowance)*(1-tax/100))*(1-pension/100)", "description": "", "templateType": "anything", "can_override": false}, "pensiondeduction": {"name": "pensiondeduction", "group": "Ungrouped variables", "definition": "aftertax*pension/100", "description": "", "templateType": "anything", "can_override": false}, "tax": {"name": "tax", "group": "Ungrouped variables", "definition": "random(15..30)", "description": "", "templateType": "anything", "can_override": false}, "pension": {"name": "pension", "group": "Ungrouped variables", "definition": "random(3..15)", "description": "", "templateType": "anything", "can_override": false}, "taxedincome": {"name": "taxedincome", "group": "Ungrouped variables", "definition": "(salary-allowance)*tax/100", "description": "", "templateType": "anything", "can_override": false}, "allowance": {"name": "allowance", "group": "Ungrouped variables", "definition": "random(1000..10000#1000)", "description": "", "templateType": "anything", "can_override": false}, "he": {"name": "he", "group": "Ungrouped variables", "definition": "random('he','she')", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["salary", "aftertax", "incomepermonth", "his", "names", "netincome", "pensiondeduction", "tax", "pension", "taxedincome", "he", "allowance"], "variable_groups": [], "functions": {"commanumber": {"parameters": [["n", "number"]], "type": "string", "language": "javascript", "definition": "var parts=n.toString().split(\".\");\n if(parts[1] && parts[1].length<2) {\n parts[1]+='0';\n }\n return parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + (parts[1] ? \".\" + parts[1] : \"\");"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

How much does {he} get per month, assuming that these are the only deductions?

\n

£ [[0]] (to the nearest penny)

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "incomepermonth", "maxValue": "incomepermonth", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": 2, "precisionPartialCredit": 100, "precisionMessage": "", "strictPrecision": true, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Numerical reasoning - price markup", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "functions": {}, "tags": ["maths-aid", "money", "numerical reasoning", "percentage", "price", "profit"], "advice": "

In order to realise a profit of {profit}%, the selling price of the item must be {100+profit}% of the cost of production.

\n

This price is $\\frac{\\var{100+profit}}{100} \\times \\var{produce} = £\\var{sell}.$

\n

When rounding this to the nearest penny, a decision has to be made whether the price is £{floor(sell*100)/100} or £{ceil(sell*100)/100}. Usually, if the next digit after the one being rounded is {if(fract(sell*100)<0.5,'less than 5 then we round down','greater than or equal to 5 then we round up')}, so we take the price to be £{dpformat(sell,2)}.

", "rulesets": {}, "parts": [{"prompt": "

Give your answer to the nearest penny.

\n

£ [[0]]

", "gaps": [{"precisiontype": "dp", "precisionmessage": "

You didn't give your answer to the nearest penny. Round your answer to two decimal places.

", "maxvalue": "precround(sell,2)+0.005", "minvalue": "precround(sell,2)-0.005", "precisionpartialcredit": 50.0, "precision": 2.0, "marks": 1.0, "type": "numberentry", "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}], "statement": "

An item costs £{dpformat(produce,2)} to produce. How much should the manufacturer sell these items for if it wants to realise a profit of {profit}% on these items?

", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"profit": {"definition": "random(5..35#10)", "name": "profit"}, "sell": {"definition": "produce*(1+profit/100)", "name": "sell"}, "produce": {"definition": "random(2..10)+random(0.25,0.75,0.50)", "name": "produce"}}, "metadata": {"notes": "", "description": "

Given the cost to produce an item and a desired markup, calculate the appropriate sale price.

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Numerical reasoning - average salary", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "functions": {"commanumber": {"definition": "var parts=n.toString().split(\".\");\n if(parts[1] && parts[1].length<2) {\n parts[1]+='0';\n }\n return parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + (parts[1] ? \".\" + parts[1] : \"\");", "type": "string", "language": "javascript", "parameters": [["n", "number"]]}}, "tags": ["average", "maths-aid", "mean", "money", "numerical reasoning", "percentage", "weighted"], "advice": "

This is a weighted average.

\n

The average value is given by multiplying each salary value by the frequency with which it occurs amongst the staff (in fraction form), and adding the resulting numbers together.

\n

For example, the salary £{commanumber(salary[0])} has a frequency of {per[0]}% which is $\\frac{\\var{per[0]}}{100} = \\var{per[0]/100}$. When we multiply these together we get \\[ £\\var{latex(commanumber(salary[0]))} \\times \\frac{\\var{per[0]}}{100} = \\var{salary[0]*per[0]/100}. \\]

\n

For this question we have 4 salary values and the weighted average is \\[\\begin{align} & \\frac{\\var{per[0]}}{100} \\times \\var{latex(commanumber(salary[0]))} + \\frac{\\var{per[1]}}{100} \\times \\var{latex(commanumber(salary[1]))} + \\frac{\\var{per[2]}}{100} \\times \\var{latex(commanumber(salary[2]))} + \\frac{\\var{per[3]}}{100} \\times \\var{latex(commanumber(salary[3]))} \\\\ &= £\\var{latex(commanumber(salary[0]*per[0]/100))} + £\\var{latex(commanumber(salary[1]*per[1]/100))} + £\\var{latex(commanumber(salary[2]*per[2]/100))} + £\\var{latex(commanumber(salary[3]*per[3]/100))} \\\\ &= £\\var{latex(commanumber(average))} \\end{align} \\]

", "rulesets": {}, "parts": [{"prompt": "

What is the average salary?

\n

£ [[0]]

", "gaps": [{"minvalue": "average", "type": "numberentry", "maxvalue": "average", "marks": 1.0, "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}], "statement": "

In a department {per[0]}% of the staff have a salary of £{commanumber(salary[0])}, {per[1]}% a salary of £{commanumber(salary[1])}, {per[2]}% a salary of £{commanumber(salary[2])}, and {per[3]}% a salary of £{commanumber(salary[3])}.

", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"salary": {"definition": "shuffle([salary0,salary1,salary2,salary3])", "name": "salary"}, "salary1": {"definition": "random(15000..50000#5000 except salary0)", "name": "salary1"}, "salary0": {"definition": "random(15000..50000#5000)", "name": "salary0"}, "salary3": {"definition": "random(15000..50000#5000 except [salary0,salary1,salary2])", "name": "salary3"}, "salary2": {"definition": "random(15000..50000#5000 except [salary0,salary1])", "name": "salary2"}, "average": {"definition": "(per[0]*salary[0]+per[1]*salary[1]+per[2]*salary[2]+per[3]*salary[3])/100", "name": "average"}, "per": {"definition": "shuffle([per0,per1,per2,per3])", "name": "per"}, "per3": {"definition": "100-per0-per1-per2", "name": "per3"}, "per2": {"definition": "random(10..min(50,90-per0-per1)#10)", "name": "per2"}, "per1": {"definition": "random(10..min(50,80-per0)#10)", "name": "per1"}, "per0": {"definition": "random(10..50#10)", "name": "per0"}}, "metadata": {"notes": "", "description": "

Compute the weighted average salary in a department, given four salary levels and the percentages of staff earning them.

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Numerical reasoning - lottery syndicate", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "tags": ["lottery", "maths-aid", "money", "numerical reasoning", "ratio", "shares"], "metadata": {"description": "

Given the stakes of three people in a lottery syndicate, and the amount the syndicate won, work out each person's share of the winnings.

\n

Based on question 4 from section 3.2 of the Maths-Aid workbook on numerical reasoning.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

{names[0]}, {names[1]} and {names[2]} agree to buy {numbernames[total]} pounds' worth of lottery tickets, with {names[0]} contributing £{share[0]}, {names[1]} contributing £{share[1]} and {names[2]} contributing £{share[2]}.

\n

They agree that if they win anything with any of these tickets that it should be shared out in the same ratio as their contributions.

", "advice": "

Their agreement means that the winnings should go to {names[0]}, {names[1]} and {names[2]} in the ratio $\\var{share[0]}:\\var{share[1]}:\\var{share[2]}$. Think of these as being shares in the winnings.

\n

There are $\\var{share[0]}+\\var{share[1]}+\\var{share[2]} = \\var{total}$ shares in all for the £{win}.

\n

Hence each share is worth $£\\var{win} \\div \\var{total} = £\\var{part}$.

\n

So {names[0]} gets {share[0]} {pluralise(share[0],'share','shares')} = $\\var{share[0]} \\times £\\var{part} = £\\var{winnings[0]}$, {names[1]} {share[1]} {pluralise(share[1],'share','shares')} = $\\var{share[1]} \\times £\\var{part} = £\\var{winnings[1]}$ and {names[2]} {share[2]} {pluralise(share[2],'share','shares')} = $\\var{share[2]} \\times £\\var{part} = £\\var{winnings[2]}$.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"numbernames": {"name": "numbernames", "group": "Ungrouped variables", "definition": "['zero','one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen']", "description": "", "templateType": "anything", "can_override": false}, "winnings": {"name": "winnings", "group": "Ungrouped variables", "definition": "map(x*part,x,share)", "description": "", "templateType": "anything", "can_override": false}, "names": {"name": "names", "group": "Ungrouped variables", "definition": "shuffle(['Bob','Terry','Cilla','Jim','Margaret','Cyril','Ethel','Horace','Beryl'])[0..3]", "description": "", "templateType": "anything", "can_override": false}, "share": {"name": "share", "group": "Ungrouped variables", "definition": "shuffle([share0,share1,share2])", "description": "", "templateType": "anything", "can_override": false}, "share1": {"name": "share1", "group": "Ungrouped variables", "definition": "random(1..min(floor(total/2),total-1-share0))", "description": "", "templateType": "anything", "can_override": false}, "share0": {"name": "share0", "group": "Ungrouped variables", "definition": "random(1..floor(total/2))", "description": "", "templateType": "anything", "can_override": false}, "share2": {"name": "share2", "group": "Ungrouped variables", "definition": "total-share0-share1", "description": "", "templateType": "anything", "can_override": false}, "part": {"name": "part", "group": "Ungrouped variables", "definition": "win/total", "description": "", "templateType": "anything", "can_override": false}, "win": {"name": "win", "group": "Ungrouped variables", "definition": "random(2..10)*total*5", "description": "", "templateType": "anything", "can_override": false}, "total": {"name": "total", "group": "Ungrouped variables", "definition": "random(6..15)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["numbernames", "winnings", "names", "share", "share0", "share1", "share2", "part", "win", "total"], "variable_groups": [], "functions": {"pluralise": {"parameters": [["n", "number"], ["single", "string"], ["plural", "string"]], "type": "string", "language": "javascript", "definition": "return Numbas.util.pluralise(n,single,plural);"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

They win £{win}. How much does each get?

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
{names[0]}£ [[0]]
{names[1]}£ [[1]]
{names[2]}£ [[2]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "winnings[0]", "maxValue": "winnings[0]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "winnings[1]", "maxValue": "winnings[1]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "winnings[2]", "maxValue": "winnings[2]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}], "pickQuestions": 0}], "timing": {"timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "percentpass": 0.0, "allQuestions": true, "pickQuestions": 0, "questions": [], "metadata": {"description": "

Questions about percentage and ratio, applied to finance.

\n

Based on section 3.2 of the Maths-Aid workbook on numerical reasoning.

", "licence": "Creative Commons Attribution 4.0 International", "notes": ""}, "type": "exam", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Sharika Mesba", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3475/"}], "extensions": [], "custom_part_types": [], "resources": []}