// Numbas version: exam_results_page_options {"name": "Numerical reasoning - tax", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Numerical reasoning - tax", "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": {}, "extensions": [], "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", "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/"}]}