// Numbas version: finer_feedback_settings {"name": "Order of Operations: brackets, powers and the four basics", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "", "statement": "", "tags": [], "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"ans2": {"name": "ans2", "definition": "h*(f-g)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "tsub": {"name": "tsub", "definition": "2*sub", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "g": {"name": "g", "definition": "list[3]", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "subs": {"name": "subs", "definition": "sub^2", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "sub": {"name": "sub", "definition": "random(1..3)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "ans3": {"name": "ans3", "definition": "base+a", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "base": {"name": "base", "definition": "list[4]", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "b": {"name": "b", "definition": "if(c-3>=0,random(1,2,3),random(1..12))", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "ans1": {"name": "ans1", "definition": "a*b^c+d", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "c": {"name": "c", "definition": "random(0,2,3,4)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "list": {"name": "list", "definition": "shuffle(2..12)[0..6]", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "diffs": {"name": "diffs", "definition": "diff^2", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "h": {"name": "h", "definition": "list[5]", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "denom": {"name": "denom", "definition": "-base+tsub", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "d": {"name": "d", "definition": "list[1]", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "f": {"name": "f", "definition": "list[2]", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "diff": {"name": "diff", "definition": "base-sub", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "a": {"name": "a", "definition": "list[0]", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "num": {"name": "num", "definition": "subs-diffs", "group": "Ungrouped variables", "templateType": "anything", "description": ""}}, "extensions": [], "ungrouped_variables": ["list", "a", "b", "c", "d", "ans1", "f", "h", "g", "ans2", "base", "sub", "diff", "subs", "diffs", "num", "tsub", "denom", "ans3"], "preamble": {"js": "", "css": ""}, "variable_groups": [], "name": "Order of Operations: brackets, powers and the four basics", "functions": {}, "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": ""}, "parts": [{"showCorrectAnswer": true, "variableReplacements": [], "steps": [{"showCorrectAnswer": true, "variableReplacements": [], "type": "information", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "prompt": "
The order of operation dictates that we deal with powers before multiplication/division and also deal with multiplication/division before addition/subtraction , that is
\n$\\var{d}+\\var{a}\\times\\var{b}^\\var{c}$ | \n$=$ | \n$\\var{d}+\\var{a}\\times\\var{b^c}$ | \n
\n | $=$ | \n$\\var{d}+\\var{a*b^c}$ | \n
\n | $=$ | \n$\\var{ans1}$ | \n
$\\var{d}+\\var{a}\\times\\var{b}^\\var{c}=$ [[0]]
"}, {"showCorrectAnswer": true, "variableReplacements": [], "steps": [{"showCorrectAnswer": true, "variableReplacements": [], "type": "information", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "prompt": "Note: $\\var{h}(\\var{f}-\\var{g})$ means $\\var{h}\\times(\\var{f-g})$.
\n\nThe order of operation dictates that we deal with brackets (grouping symbols) before multiplication, that is
\n$\\var{h}(\\var{f}-\\var{g})$ | \n$=$ | \n$\\var{h}(\\var{f-g})$ | \n
\n | $=$ | \n$\\var{ans2}$ | \n
$\\var{h}(\\var{f}-\\var{g})=$ [[0]]
"}, {"showCorrectAnswer": true, "variableReplacements": [], "steps": [{"showCorrectAnswer": true, "variableReplacements": [], "type": "information", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "prompt": "Note: A fraction $\\frac{a}{b}$ is the same as $(a)\\div (b)$, so we have to evaluate the numerator and denominator before doing the division. We can evaluate the numerator at the same time as we evaluate the denominator.
\n$\\displaystyle{\\var{a}+\\frac{\\var{sub}^2-(\\var{base}-\\var{sub})^2}{-\\var{base}+2\\times\\var{sub}}}$ | \n$=$ | \n$\\displaystyle{\\var{a}+\\frac{\\var{sub}^2-(\\var{diff})^2}{-\\var{base}+2\\times\\var{sub}}}$ | \n(work on the innermost bracketed expression first) | \n
\n | $=$ | \n$\\displaystyle{\\var{a}+\\frac{\\var{subs}-\\var{diffs}}{-\\var{base}+2\\times\\var{sub}}}$ | \n(doing the powers on the numerator, and multiplication on the denominator) | \n
\n | $=$ | \n$\\displaystyle{\\var{a}+\\frac{\\var{num}}{-\\var{base}+\\var{tsub}}}$ | \n(doing multiplication on the denominator and addition on the numerator) | \n
\n | $=$ | \n$\\displaystyle{\\var{a}+\\frac{\\var{num}}{\\var{denom}}}$ | \n(continue working on the denominator) | \n
\n | $=$ | \n$\\displaystyle{\\var{a}+\\var{base}}$ | \n(do the division, or simplify the fraction) | \n
\n | $=$ | \n$\\var{ans3}$ | \n(finally do the last addition) | \n
$\\displaystyle{\\var{a}+\\frac{\\var{sub}^2-(\\var{base}-\\var{sub})^2}{-\\var{base}+2\\times\\var{sub}}} =$ [[0]]
"}], "type": "question", "contributors": [{"name": "Angus Rosenburgh", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2048/"}]}]}], "contributors": [{"name": "Angus Rosenburgh", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2048/"}]}