// Numbas version: finer_feedback_settings {"name": "The 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": [{"name": "The order of operations: brackets, powers and the four basics", "advice": "", "preamble": {"js": "", "css": ""}, "statement": "", "functions": {}, "rulesets": {}, "variable_groups": [], "parts": [{"prompt": "

$\\var{d}+\\var{a}\\times\\var{b}^\\var{c}=$ [[0]]

", "stepsPenalty": "1", "marks": 0, "gaps": [{"variableReplacements": [], "minValue": "{ans1}", "marks": 1, "maxValue": "{ans1}", "scripts": {}, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "correctAnswerFraction": false, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry"}], "steps": [{"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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\var{d}+\\var{a}\\times\\var{b}^\\var{c}$$=$$\\var{d}+\\var{a}\\times\\var{b^c}$
$=$$\\var{d}+\\var{a*b^c}$
$=$$\\var{ans1}$
", "marks": 0, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "type": "information"}], "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "type": "gapfill"}, {"prompt": "

$\\var{h}(\\var{f}-\\var{g})=$ [[0]]

", "stepsPenalty": "1", "marks": 0, "gaps": [{"variableReplacements": [], "minValue": "{ans2}", "marks": 1, "maxValue": "{ans2}", "scripts": {}, "variableReplacementStrategy": "originalfirst", "allowFractions": true, "correctAnswerFraction": true, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry"}], "steps": [{"prompt": "

Note: $\\var{h}(\\var{f}-\\var{g})$ means $\\var{h}\\times(\\var{f-g})$.

\n

\n

The order of operation dictates that we deal with brackets (grouping symbols) before multiplication, that is 

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\var{h}(\\var{f}-\\var{g})$$=$$\\var{h}(\\var{f-g})$
$=$$\\var{ans2}$
\n

", "marks": 0, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "type": "information"}], "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "type": "gapfill"}, {"prompt": "

$\\displaystyle{\\var{a}+\\frac{\\var{sub}^2-(\\var{base}-\\var{sub})^2}{-\\var{base}+2\\times\\var{sub}}} =$ [[0]]

", "stepsPenalty": "1", "marks": 0, "gaps": [{"variableReplacements": [], "minValue": "{ans3}", "marks": 1, "maxValue": "{ans3}", "scripts": {}, "variableReplacementStrategy": "originalfirst", "allowFractions": true, "correctAnswerFraction": true, "showPrecisionHint": false, "showCorrectAnswer": true, "type": "numberentry"}], "steps": [{"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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\displaystyle{\\var{a}+\\frac{\\var{sub}^2-(\\var{base}-\\var{sub})^2}{-\\var{base}+2\\times\\var{sub}}}$$=$$\\displaystyle{\\var{a}+\\frac{\\var{sub}^2-(\\var{diff})^2}{-\\var{base}+2\\times\\var{sub}}}$(work on the innermost bracketed expression first)
$=$$\\displaystyle{\\var{a}+\\frac{\\var{subs}-\\var{diffs}}{-\\var{base}+2\\times\\var{sub}}}$(doing the powers on the numerator, and multiplication on the denominator)
$=$$\\displaystyle{\\var{a}+\\frac{\\var{num}}{-\\var{base}+\\var{tsub}}}$(doing multiplication on the denominator and addition on the numerator)
$=$$\\displaystyle{\\var{a}+\\frac{\\var{num}}{\\var{denom}}}$(continue working on the denominator)
$=$$\\displaystyle{\\var{a}+\\var{base}}$(do the division, or simplify the fraction)
$=$$\\var{ans3}$(finally do the last addition)
", "marks": 0, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "type": "information"}], "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "type": "gapfill"}], "tags": ["order of operations", "precedence"], "showQuestionGroupNames": false, "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"sub": {"name": "sub", "definition": "random(1..3)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "d": {"name": "d", "definition": "list[1]", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "a": {"name": "a", "definition": "list[0]", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "subs": {"name": "subs", "definition": "sub^2", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "ans2": {"name": "ans2", "definition": "h*(f-g)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "ans3": {"name": "ans3", "definition": "base+a", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "tsub": {"name": "tsub", "definition": "2*sub", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "num": {"name": "num", "definition": "subs-diffs", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "ans1": {"name": "ans1", "definition": "a*b^c+d", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "diff": {"name": "diff", "definition": "base-sub", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "b": {"name": "b", "definition": "if(c-3>=0,random(1,2,3),random(1..12))", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "f": {"name": "f", "definition": "list[2]", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "base": {"name": "base", "definition": "list[4]", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "h": {"name": "h", "definition": "list[5]", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "g": {"name": "g", "definition": "list[3]", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "diffs": {"name": "diffs", "definition": "diff^2", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "denom": {"name": "denom", "definition": "-base+tsub", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "list": {"name": "list", "definition": "shuffle(2..12)[0..6]", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "c": {"name": "c", "definition": "random(0,2,3,4)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}}, "ungrouped_variables": ["list", "a", "b", "c", "d", "ans1", "f", "h", "g", "ans2", "base", "sub", "diff", "subs", "diffs", "num", "tsub", "denom", "ans3"], "question_groups": [{"name": "", "questions": [], "pickingStrategy": "all-ordered", "pickQuestions": 0}], "metadata": {"description": "", "notes": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "contributors": [{"name": "Marlon Arcila", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/321/"}]}]}], "contributors": [{"name": "Marlon Arcila", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/321/"}]}