// 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\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}$
"}], "type": "gapfill", "stepsPenalty": "1", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "gaps": [{"showCorrectAnswer": true, "correctAnswerStyle": "plain", "minValue": "{ans1}", "allowFractions": false, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "maxValue": "{ans1}", "scripts": {}, "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "type": "numberentry"}], "scripts": {}, "marks": 0, "prompt": "

$\\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

\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

"}], "type": "gapfill", "stepsPenalty": "1", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "gaps": [{"showCorrectAnswer": true, "correctAnswerStyle": "plain", "minValue": "{ans2}", "allowFractions": true, "correctAnswerFraction": true, "variableReplacementStrategy": "originalfirst", "maxValue": "{ans2}", "scripts": {}, "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "type": "numberentry"}], "scripts": {}, "marks": 0, "prompt": "

$\\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\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)
"}], "type": "gapfill", "stepsPenalty": "1", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "gaps": [{"showCorrectAnswer": true, "correctAnswerStyle": "plain", "minValue": "{ans3}", "allowFractions": true, "correctAnswerFraction": true, "variableReplacementStrategy": "originalfirst", "maxValue": "{ans3}", "scripts": {}, "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "type": "numberentry"}], "scripts": {}, "marks": 0, "prompt": "

$\\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/"}]}