// Numbas version: exam_results_page_options {"name": "2. Precedence of operators", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "statement": "

Evaluate the following expressions:

", "name": "2. Precedence of operators", "extensions": [], "ungrouped_variables": ["f2", "b2", "d2", "g2", "i1", "a2", "c2", "e1", "e2", "a", "c", "b", "d", "g", "f", "h", "k", "j", "m", "l", "n", "q", "p", "s", "r", "t"], "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "

First work through the expression from left to right, evaluating any expressions inside brackets, being careful to evaluate powers (indices) before MDAS. Thus:

\n

a)

\n

$[(\\var{a}-\\var{b} \\div \\var{c}^\\var{d})+\\var{e1} \\times \\var{f}^\\var{g}] \\div (\\var{h} \\times \\var{i1}^\\var{j} -\\var{k}) \\times [\\var{l} -\\var{m} \\times \\var{n} + \\var{p} \\div \\var{q}]$

\n

$=[(\\var{a}-\\var{b} \\div \\var{c^d})+\\var{e1} \\times \\var{f^g}] \\div (\\var{h} \\times \\var{i1^j} -\\var{k}) \\times [\\var{l} -\\var{m} \\times \\var{n} + \\var{p} \\div \\var{q}]$

\n

$=[(\\var{a}-\\var{b / (c^d)})+\\var{e1*f^g}] \\div (\\var{h * i1^j} -\\var{k}) \\times [\\var{l} -\\var{m*n} + \\var{p / q}]$

\n

$=[\\var{a-b / (c^d)+e1*f^g}] \\div (\\var{h * i1^j -k}) \\times [\\var{l -m*n + p / q}]=\\var{t*(l-m*n+s)}$

\n

b)

\n

$\\var{a2}+\\var{b2} \\times (\\var{-c2})^\\var{d2} +(\\var{e2}-\\var{f2})^\\var{g2}=\\var{a2}+\\var{b2} \\times (\\var{(-c2)^d2}) +(\\var{e2-f2})^\\var{g2}=\\var{a2}+\\var{b2*((-c2)^d2)} +\\var{(e2-f2)^g2}=\\var{a2+b2*(-c2)^d2 +(e2-f2)^g2}$

", "parts": [{"maxValue": "{t*(l-m*n+s)}", "customMarkingAlgorithm": "", "unitTests": [], "showFeedbackIcon": true, "minValue": "{t*(l-m*n+s)}", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "type": "numberentry", "prompt": "

$[(\\var{a}-\\var{b} \\div \\var{c}^\\var{d})+\\var{e1} \\times \\var{f}^\\var{g}] \\div (\\var{h} \\times \\var{i1}^\\var{j} -\\var{k}) \\times [\\var{l} -\\var{m} \\times \\var{n} + \\var{p} \\div \\var{q}]$

", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "allowFractions": false, "scripts": {}}, {"maxValue": "{a2+b2*(-c2)^d2 +(e2-f2)^g2}", "customMarkingAlgorithm": "", "unitTests": [], "showFeedbackIcon": true, "minValue": "{a2+b2*(-c2)^d2 +(e2-f2)^g2}", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "type": "numberentry", "prompt": "

$\\var{a2}+\\var{b2} \\times (\\var{-c2})^\\var{d2} +(\\var{e2}-\\var{f2})^\\var{g2}$

", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "allowFractions": false, "scripts": {}}], "preamble": {"css": "", "js": ""}, "rulesets": {}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "variable_groups": [], "tags": [], "variables": {"n": {"description": "", "name": "n", "definition": "random(2..11)", "templateType": "anything", "group": "Ungrouped variables"}, "q": {"description": "", "name": "q", "definition": "random(2..4)", "templateType": "anything", "group": "Ungrouped variables"}, "b2": {"description": "", "name": "b2", "definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables"}, "l": {"description": "", "name": "l", "definition": "random(2..6)", "templateType": "anything", "group": "Ungrouped variables"}, "s": {"description": "", "name": "s", "definition": "random(3..5)", "templateType": "anything", "group": "Ungrouped variables"}, "d": {"description": "", "name": "d", "definition": "random(2..4)", "templateType": "anything", "group": "Ungrouped variables"}, "b": {"description": "", "name": "b", "definition": "r*c^d", "templateType": "anything", "group": "Ungrouped variables"}, "a2": {"description": "", "name": "a2", "definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables"}, "k": {"description": "", "name": "k", "definition": "random(2..7)", "templateType": "anything", "group": "Ungrouped variables"}, "p": {"description": "", "name": "p", "definition": "q*s", "templateType": "anything", "group": "Ungrouped variables"}, "d2": {"description": "", "name": "d2", "definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables"}, "m": {"description": "", "name": "m", "definition": "random(3..7)", "templateType": "anything", "group": "Ungrouped variables"}, "f2": {"description": "", "name": "f2", "definition": "random(2..5 except e2)", "templateType": "anything", "group": "Ungrouped variables"}, "h": {"description": "", "name": "h", "definition": "random(2..4)", "templateType": "anything", "group": "Ungrouped variables"}, "i1": {"description": "", "name": "i1", "definition": "random(2..5 except [c,f])", "templateType": "anything", "group": "Ungrouped variables"}, "e2": {"description": "", "name": "e2", "definition": "random(1..5)", "templateType": "anything", "group": "Ungrouped variables"}, "t": {"description": "", "name": "t", "definition": "random(2..4)", "templateType": "anything", "group": "Ungrouped variables"}, "g2": {"description": "", "name": "g2", "definition": "random(2..3)", "templateType": "anything", "group": "Ungrouped variables"}, "a": {"description": "", "name": "a", "definition": "(b/(c^d)) - e1*f^g +t*h*i1^j-t*k", "templateType": "anything", "group": "Ungrouped variables"}, "j": {"description": "", "name": "j", "definition": "random(2..4)", "templateType": "anything", "group": "Ungrouped variables"}, "c": {"description": "", "name": "c", "definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables"}, "f": {"description": "", "name": "f", "definition": "random(2..5 except c)", "templateType": "anything", "group": "Ungrouped variables"}, "c2": {"description": "", "name": "c2", "definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables"}, "g": {"description": "", "name": "g", "definition": "random(2..4)", "templateType": "anything", "group": "Ungrouped variables"}, "e1": {"description": "", "name": "e1", "definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables"}, "r": {"description": "", "name": "r", "definition": "random(2..6)", "templateType": "anything", "group": "Ungrouped variables"}}, "type": "question", "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}