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

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

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

$\\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\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": "information", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true}], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "type": "numberentry", "variableReplacements": [], "mustBeReduced": false, "maxValue": "{ans3}", "correctAnswerFraction": true, "scripts": {}, "mustBeReducedPC": 0, "minValue": "{ans3}", "variableReplacementStrategy": "originalfirst", "marks": 1, "correctAnswerStyle": "plain", "showFeedbackIcon": true}], "stepsPenalty": "1", "showFeedbackIcon": true, "marks": 0}], "functions": {}, "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": ""}, "name": "Kjell's copy of Order of Operations: brackets, powers and the four basics", "tags": [], "ungrouped_variables": ["list", "a", "b", "c", "d", "ans1", "f", "h", "g", "ans2", "base", "sub", "diff", "subs", "diffs", "num", "tsub", "denom", "ans3"], "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "", "rulesets": {}, "preamble": {"css": "", "js": ""}, "statement": "", "extensions": [], "variable_groups": [], "type": "question", "contributors": [{"name": "Kjell Hansen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/27/"}]}]}], "contributors": [{"name": "Kjell Hansen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/27/"}]}