// Numbas version: finer_feedback_settings {"name": "Johan's copy of 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": [{"statement": "", "type": "question", "name": "Johan's copy of The order of operations: brackets, powers and the four basics", "ungrouped_variables": ["list", "a", "b", "c", "d", "ans1", "f", "h", "g", "ans2", "base", "sub", "diff", "subs", "diffs", "num", "tsub", "denom", "ans3"], "preamble": {"js": "", "css": ""}, "advice": "", "functions": {}, "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "", "notes": ""}, "rulesets": {}, "tags": ["order of operations", "precedence"], "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"denom": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "-base+tsub", "name": "denom"}, "ans2": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "h*(f-g)", "name": "ans2"}, "ans3": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "base+a", "name": "ans3"}, "num": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "subs-diffs", "name": "num"}, "base": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "list[4]", "name": "base"}, "h": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "list[5]", "name": "h"}, "list": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "shuffle(2..12)[0..6]", "name": "list"}, "g": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "list[3]", "name": "g"}, "sub": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(1..3)", "name": "sub"}, "tsub": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "2*sub", "name": "tsub"}, "diffs": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "diff^2", "name": "diffs"}, "b": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "if(c-3>=0,random(1,2,3),random(1..12))", "name": "b"}, "d": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "list[1]", "name": "d"}, "diff": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "base-sub", "name": "diff"}, "a": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "list[0]", "name": "a"}, "f": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "list[2]", "name": "f"}, "ans1": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "a*b^c+d", "name": "ans1"}, "subs": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "sub^2", "name": "subs"}, "c": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(0,2,3,4)", "name": "c"}}, "parts": [{"scripts": {}, "type": "gapfill", "marks": 0, "steps": [{"scripts": {}, "type": "information", "marks": 0, "variableReplacementStrategy": "originalfirst", "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]]
", "variableReplacements": [], "showCorrectAnswer": true, "gaps": [{"scripts": {}, "showPrecisionHint": false, "type": "numberentry", "maxValue": "{ans1}", "allowFractions": false, "marks": 1, "correctAnswerFraction": false, "minValue": "{ans1}", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true}]}, {"scripts": {}, "type": "gapfill", "marks": 0, "steps": [{"scripts": {}, "type": "information", "marks": 0, "variableReplacementStrategy": "originalfirst", "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]]
", "variableReplacements": [], "showCorrectAnswer": true, "gaps": [{"scripts": {}, "showPrecisionHint": false, "type": "numberentry", "maxValue": "{ans2}", "allowFractions": true, "marks": 1, "correctAnswerFraction": true, "minValue": "{ans2}", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true}]}, {"scripts": {}, "type": "gapfill", "marks": 0, "steps": [{"scripts": {}, "type": "information", "marks": 0, "variableReplacementStrategy": "originalfirst", "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]]
", "variableReplacements": [], "showCorrectAnswer": true, "gaps": [{"scripts": {}, "showPrecisionHint": false, "type": "numberentry", "maxValue": "{ans3}", "allowFractions": true, "marks": 1, "correctAnswerFraction": true, "minValue": "{ans3}", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true}]}], "question_groups": [{"pickingStrategy": "all-ordered", "pickQuestions": 0, "name": "", "questions": []}], "showQuestionGroupNames": false, "contributors": [{"name": "Johan Maertens", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1301/"}]}]}], "contributors": [{"name": "Johan Maertens", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1301/"}]}