// Numbas version: finer_feedback_settings {"name": "Kjell's copy of 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": [{"variables": {"c": {"name": "c", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(0,2,3,4)", "description": ""}, "ans2": {"name": "ans2", "group": "Ungrouped variables", "templateType": "anything", "definition": "h*(f-g)", "description": ""}, "g": {"name": "g", "group": "Ungrouped variables", "templateType": "anything", "definition": "list[3]", "description": ""}, "sub": {"name": "sub", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..3)", "description": ""}, "d": {"name": "d", "group": "Ungrouped variables", "templateType": "anything", "definition": "list[1]", "description": ""}, "ans3": {"name": "ans3", "group": "Ungrouped variables", "templateType": "anything", "definition": "base+a", "description": ""}, "subs": {"name": "subs", "group": "Ungrouped variables", "templateType": "anything", "definition": "sub^2", "description": ""}, "tsub": {"name": "tsub", "group": "Ungrouped variables", "templateType": "anything", "definition": "2*sub", "description": ""}, "h": {"name": "h", "group": "Ungrouped variables", "templateType": "anything", "definition": "list[5]", "description": ""}, "b": {"name": "b", "group": "Ungrouped variables", "templateType": "anything", "definition": "if(c-3>=0,random(1,2,3),random(1..12))", "description": ""}, "ans1": {"name": "ans1", "group": "Ungrouped variables", "templateType": "anything", "definition": "a*b^c+d", "description": ""}, "diffs": {"name": "diffs", "group": "Ungrouped variables", "templateType": "anything", "definition": "diff^2", "description": ""}, "a": {"name": "a", "group": "Ungrouped variables", "templateType": "anything", "definition": "list[0]", "description": ""}, "diff": {"name": "diff", "group": "Ungrouped variables", "templateType": "anything", "definition": "base-sub", "description": ""}, "base": {"name": "base", "group": "Ungrouped variables", "templateType": "anything", "definition": "list[4]", "description": ""}, "list": {"name": "list", "group": "Ungrouped variables", "templateType": "anything", "definition": "shuffle(2..12)[0..6]", "description": ""}, "denom": {"name": "denom", "group": "Ungrouped variables", "templateType": "anything", "definition": "-base+tsub", "description": ""}, "f": {"name": "f", "group": "Ungrouped variables", "templateType": "anything", "definition": "list[2]", "description": ""}, "num": {"name": "num", "group": "Ungrouped variables", "templateType": "anything", "definition": "subs-diffs", "description": ""}}, "parts": [{"scripts": {}, "showCorrectAnswer": true, "prompt": "
$\\var{d}+\\var{a}\\times\\var{b}^\\var{c}=$ [[0]]
", "type": "gapfill", "variableReplacements": [], "steps": [{"scripts": {}, "showCorrectAnswer": true, "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{h}(\\var{f}-\\var{g})=$ [[0]]
", "type": "gapfill", "variableReplacements": [], "steps": [{"scripts": {}, "showCorrectAnswer": true, "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
$\\displaystyle{\\var{a}+\\frac{\\var{sub}^2-(\\var{base}-\\var{sub})^2}{-\\var{base}+2\\times\\var{sub}}} =$ [[0]]
", "type": "gapfill", "variableReplacements": [], "steps": [{"scripts": {}, "showCorrectAnswer": true, "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