// Numbas version: finer_feedback_settings {"name": "Arithmetic operations", "metadata": {"description": "
Evaluating arithmetic operations, and the order of operations.
", "licence": "Creative Commons Attribution 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", ""], "variable_overrides": [[], [], []], "questions": [{"name": "Basic arithmetic operations: addition and subtraction", "extensions": [], "custom_part_types": [], "resources": [["question-resources/drawingresize_grbP9s8.svg", "/srv/numbas/media/question-resources/drawingresize_grbP9s8.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "type": "question", "statement": "Calculate the following:
", "variablesTest": {"condition": "", "maxRuns": "100"}, "variables": {"pos": {"description": "Random positive integers.
", "name": "pos", "group": "Ungrouped variables", "templateType": "anything", "definition": "repeat(random(1..300),5)"}, "neg": {"description": "Random negative integers.
", "name": "neg", "group": "Ungrouped variables", "templateType": "anything", "definition": "repeat(random(-300..-1),8)"}, "dec": {"description": "Random decimals.
", "name": "dec", "group": "Ungrouped variables", "templateType": "anything", "definition": "repeat(random(0..50 #0.01 except 0..50), 7)"}}, "functions": {}, "tags": ["addition", "Addition", "Decimals", "decimals", "subtraction", "taxonomy"], "variable_groups": [], "parts": [{"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "pos[0]+pos[1]+pos[2]", "showFeedbackIcon": true, "minValue": "pos[0]+pos[1]+pos[2]", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "1", "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "$\\var{pos[0]} + \\var{pos[1]} + \\var{pos[2]}=$ [[0]]
", "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "pos[3]+neg[0]", "showFeedbackIcon": true, "minValue": "pos[3]+neg[0]", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "1", "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "$\\var{pos[3]} +(\\var{neg[0]})=$ [[0]]
", "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "dec[0] - dec[1]", "showFeedbackIcon": true, "minValue": "dec[0] - dec[1]", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "1", "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "$\\var{dec[0]} - \\var{dec[1]}=$ [[0]]
", "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "neg[1]-neg[2]", "showFeedbackIcon": true, "minValue": "neg[1]-neg[2]", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "1", "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "$\\var{neg[1]} - (\\var{neg[2]})=$ [[0]]
", "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "neg[3]+dec[2]", "showFeedbackIcon": true, "minValue": "neg[3]+dec[2]", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "1", "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "$\\var{neg[3]} + \\var{dec[2]}=$ [[0]]
", "marks": 0}], "ungrouped_variables": ["dec", "neg", "pos"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Addition and subtraction of integers and decimals.
"}, "preamble": {"css": "", "js": ""}, "advice": "A sign between numbers usually tells us whether to add or subtract. Sometimes, we can see two signs following each other.
\nWe need to remember that two different signs (+ and - in any order) become a minus (-), while two same signs become a plus (+).
\nOperation | \nFirst sign | \nSecond sign | \nResulting sign | \nResulting operation | \nExample | \n
---|---|---|---|---|---|
Addition | \n$+$ | \n$+$ | \n$+$ | \nAddition | \n$3 + (+2) = 3 + 2 = 5$ | \n
Addition | \n$+$ | \n$-$ | \n$-$ | \nSubtraction | \n$3 + (-2) = 3 - 2 = 1$ | \n
Subtraction | \n$-$ | \n$+$ | \n$-$ | \nSubtraction | \n$3 - (+2) = 3 - 2 = 1$ | \n
Subtraction | \n$-$ | \n$-$ | \n$+$ | \nAddition | \n$3 - (-2) = 3 + 2 = 5$ | \n
Another important thing to remember is to press AC on your calculator to clear it before you start the next calculation. If the following calculation starts with a minus, your calculator will assume you want to subtract something from your previous calculation, rather than start a new one.
"}, {"name": "Determining the resulting sign of an arithmetic operation", "extensions": [], "custom_part_types": [], "resources": [["question-resources/drawingresize_grbP9s8.svg", "/srv/numbas/media/question-resources/drawingresize_grbP9s8.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "variable_groups": [], "functions": {}, "rulesets": {}, "ungrouped_variables": ["dec", "neg", "pos"], "metadata": {"description": "Given an equation with an unknown, determine if the unknown is positive or negative.
\nFirst part is the product of two numbers; second part is the product of three.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "advice": "The following rules apply to multiplication and division.
\nFirst sign | \noperation | \nSecond sign | \nResulting sign | \nExample | \n
---|---|---|---|---|
$+$ | \n$\\times$ or $\\div$ | \n$+$ | \n$+$ | \n$3 \\times 2 = 6$ | \n
$+$ | \n$\\times$ or $\\div$ | \n$-$ | \n$-$ | \n$3 \\times (-2) = -6$ | \n
$-$ | \n$\\times$ or $\\div$ | \n$+$ | \n$-$ | \n$(-3) \\times 2 = -6$ | \n
$-$ | \n$\\times$ or $\\div$ | \n$-$ | \n$+$ | \n$(-3) \\times (-2) = 6$ | \n
$(\\var{neg[4]}) \\times (\\var{neg[5]})$ will be positive, as negative times negative gives us positive.
\n$\\var{pos[4]} \\times (\\var{neg[6]}) \\times \\var{dec[5]}$ will be negative, as positive times negative times positive gives us negative.
\nTo check these:
\n\\[\\begin{align} a &=(\\var{neg[4]}) \\times (\\var{neg[5]}) \\\\&= + \\var{neg[4]*neg[5]} \\text{ (positive),} \\\\ b &= \\var{pos[4]} \\times (\\var{neg[6]}) \\times \\var{dec[5]} \\\\&= \\var{pos[4]*neg[6]*dec[5]} \\text{ (negative).} \\end{align} \\]
", "statement": "Decide whether each of the following numbers is positive or negative.
", "preamble": {"js": "", "css": ""}, "variables": {"pos": {"name": "pos", "description": "Random positive integers.
", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(1..300),5)"}, "dec": {"name": "dec", "description": "Random decimals.
", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(0..50 #0.01 except 0..50), 7)"}, "neg": {"name": "neg", "description": "Random negative integers.
", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(-300..-1),8)"}}, "parts": [{"variableReplacementStrategy": "originalfirst", "prompt": "$a = (\\var{neg[4]}) \\times (\\var{neg[5]})$ [[0]]
", "gaps": [{"variableReplacementStrategy": "originalfirst", "choices": ["$a$ is positive
", "$a$ is negative
"], "matrix": ["1", 0], "maxMarks": 0, "shuffleChoices": false, "variableReplacements": [], "type": "1_n_2", "displayColumns": 0, "marks": 0, "minMarks": 0, "displayType": "radiogroup", "showFeedbackIcon": true, "showCorrectAnswer": true, "distractors": ["", ""], "scripts": {}}], "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "scripts": {}}, {"variableReplacementStrategy": "originalfirst", "prompt": "$b = \\var{pos[4]} \\times (\\var{neg[6]}) \\times \\var{dec[5]}$ [[0]]
\n", "gaps": [{"variableReplacementStrategy": "originalfirst", "choices": ["$b$ is positive
", "$b$ is negative
"], "matrix": [0, "1"], "maxMarks": 0, "shuffleChoices": false, "variableReplacements": [], "type": "1_n_2", "displayColumns": 0, "marks": 0, "minMarks": 0, "displayType": "radiogroup", "showFeedbackIcon": true, "showCorrectAnswer": true, "distractors": ["", ""], "scripts": {}}], "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "scripts": {}}], "tags": ["multiplication", "taxonomy"], "variablesTest": {"maxRuns": "100", "condition": ""}}, {"name": "Using BODMAS to evaluate arithmetic expressions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "variable_groups": [], "variables": {"int": {"templateType": "anything", "definition": "random(2..10 except sint)", "description": "Random integer from 2 to 10.
", "name": "int", "group": "Ungrouped variables"}, "oint": {"templateType": "anything", "definition": "random(1..9 #2 except int except sint)", "description": "Random odd integer from 1 to 9.
", "name": "oint", "group": "Ungrouped variables"}, "bint": {"templateType": "anything", "definition": "random(20..50)", "description": "A random slightly bigger integer.
", "name": "bint", "group": "Ungrouped variables"}, "pint": {"templateType": "anything", "definition": "random(1..4 except 3)", "description": "1, 2 or 4.
", "name": "pint", "group": "Ungrouped variables"}, "eint": {"templateType": "anything", "definition": "random(1..9 #2 except int except sint)", "description": "Random even integer from 2 to 10.
", "name": "eint", "group": "Ungrouped variables"}, "sint": {"templateType": "anything", "definition": "random(2..6)", "description": "Random integer from 1 to 5.
", "name": "sint", "group": "Ungrouped variables"}}, "type": "question", "parts": [{"maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", "", ""], "displayColumns": 0, "displayType": "radiogroup", "scripts": {}, "showFeedbackIcon": true, "marks": 0, "variableReplacementStrategy": "originalfirst", "matrix": ["1", 0, 0], "choices": ["{int*int}
", "{int}
", "1
"], "shuffleChoices": true, "variableReplacements": [], "prompt": "$\\var{int*int} ÷ \\var{int} \\times \\var{int} =$ $?$
"}, {"maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", "", ""], "displayColumns": 0, "displayType": "radiogroup", "scripts": {}, "showFeedbackIcon": true, "marks": 0, "variableReplacementStrategy": "originalfirst", "matrix": ["1", 0, 0], "choices": ["{eint*4}
", "1
", "{random(2..40 except eint*4)}
"], "shuffleChoices": true, "variableReplacements": [], "prompt": "$\\var{eint*2} ÷ \\var{eint/2} \\times \\var{eint}=$ $?$
"}, {"maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", "", ""], "displayColumns": 0, "displayType": "radiogroup", "scripts": {}, "showFeedbackIcon": true, "marks": 0, "variableReplacementStrategy": "originalfirst", "matrix": [0, "1", 0], "choices": ["{(sint + sint + 2)*sint}
", "{sint + (sint + 2)*sint}
", "{(((sint + sint + 2)*sint) + (sint + (sint + 2)*sint))/2}
"], "shuffleChoices": true, "variableReplacements": [], "prompt": "$\\var{sint} + \\var{sint + 2} \\times \\var{sint} =$ $?$
"}, {"maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "minMarks": 0, "distractors": ["", ""], "displayColumns": 0, "displayType": "radiogroup", "scripts": {}, "showFeedbackIcon": true, "marks": 0, "variableReplacementStrategy": "originalfirst", "matrix": ["0", "1"], "choices": ["1
", "{bint - 14}
"], "shuffleChoices": false, "variableReplacements": [], "prompt": "$\\var{bint - 15} - 1 \\times 0 + \\var{bint}\\div\\var{bint} =$ $?$
"}, {"showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}, "marks": 0, "showCorrectAnswer": true, "variableReplacements": [], "steps": [{"variableReplacementStrategy": "originalfirst", "type": "information", "scripts": {}, "marks": 0, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "Root is another way of writing a power, e.g. $\\sqrt{4} = 4^{\\frac{1}{2}}$.
\nFraction means the numerator divided by the denominator, these two can be thought of as brackets while the fraction itself is a division.
\nFor example,
\n\\begin{align}
\\sqrt4 + \\frac{4+11}{5} &= 4^{\\frac{1}{2}} + (4+11) \\div 5 \\\\
&= 4^{\\frac{1}{2}} + 15 \\div 5 & \\text{(BRACKETS)}\\\\
&= 2 + 15 \\div 5 & \\text{(ORDINALS)} \\\\
&= 2 + 3 & \\text{(DIVISION/multiplication)} \\\\
&= 5 \\text{ .} & \\text{(ADDITION/subtraction)}
\\end{align}
$\\displaystyle \\frac{\\var{oint}^2+ \\sqrt{\\var{eint*eint}}}{3 \\times 2 - 2 \\times 2} + (10 - 2) \\div \\var{pint} =$ [[0]]
", "stepsPenalty": "1"}], "advice": "The correct order of carrying out operations can be remembered by the mnemonic BODMAS:
\n\n\nBrackets ⇒ Ordinals ⇒ Division/Multiplication ⇒ Addition/Subtraction
\n
It is important to notice that division and multiplication have the same priority - division does not have a priority over multiplication. Similarly, adition and subtraction also have the same priority. When the order is unclear, we work from left to right.
\nNote that brackets have the highest priority, but when we evaluate them, we still need to follow BODMAS inside them.
\nSometimes, an alternative acronym BIDMAS (Brackets, Indices, ...) is also used.
\na)
\nDivision and multiplication have the same priority, so we just work from left to right. $\\var{int*int} ÷ \\var{int} = \\var{int}$ and hence
\n\\[\\begin{align} \\var{int*int} ÷ \\var{int} \\times \\var{int} &= \\var{int} \\times \\var{int} \\\\&= \\var{int*int} \\text{.} \\end{align}\\]
\n\nb)
\nSimilarly, $\\var{eint*2} ÷ \\var{eint/2} = 4 $ and hence
\n\\[\\begin{align} \\var{eint*2} ÷ \\var{eint/2} \\times \\var{eint} &= 4 \\times \\var{eint} \\\\&= \\var{4*eint}\\text{.} \\end{align}\\]
\n\nc)
\nApplying BODMAS, multiplication has a priority over addition. $\\var{sint + 2} \\times \\var{sint} = \\var{(sint + 2)*sint}$ and hence
\n\\[\\begin{align} \\var{sint} + \\var{sint + 2} \\times \\var{sint} &= \\var{sint} + \\var{(sint + 2)*sint} \\\\&= \\var{sint + (sint + 2)*sint}\\text{.} \\end{align}\\]
\n\nd)
\nApplying BODMAS, multiplication and division have priority over addition and subtraction. $1 \\times 0 = 0$ and $\\var{bint}\\div\\var{bint} = 1$ so
\n\\[\\begin{align} \\var{bint - 15} - 1 \\times 0 + \\var{bint}\\div\\var{bint} &= \\var{bint - 15} - 0 + 1 \\\\&= \\var{bint - 14}\\text{.} \\end{align}\\]
\n\ne)
\nRoots can be considered as powers, while fractions can be considered as a bracket divided by a bracket.
\n\\[\\displaystyle \\text{Numerator is considered as a bracket } (\\var{oint}^2+ \\sqrt{\\var{eint*eint}}) \\text{ and the denominator as } (3 \\times 2 - 2 \\times 2)\\text{.}\\]
\nBefore we evaluate numerator, we calculate powers:
\n\\[\\begin{align} \\sqrt{\\var{eint*eint}} &= \\var{eint} \\text{,}
\\\\\\var{oint}^2 &= \\var{oint*oint} \\text{.} \\end{align}\\]
Before we evaluate denominator we calculate multiplications:
\n\\[\\begin{align} 3 \\times 2 &= 6 \\text{ and } \\\\ 2 \\times 2 &= 4\\text{.} \\end{align}\\]
\nPerforming addition/subtraction as the last step in evaluating numerator/denominator we get:
\n\\[ \\begin{align} (\\var{oint}^2+ \\sqrt{\\var{eint*eint}}) &= \\var{oint*oint} + \\var{eint}
\\\\&= \\var{oint*oint + eint}
\\\\\\text{and}
\\\\(3 \\times 2 - 2 \\times 2) &= 6 - 4
\\\\&= 2 \\end{align} \\]
So the fraction
\n\\[\\begin{align} \\displaystyle \\frac{(\\var{oint}^2+ \\var{eint})}{(3 \\times 2 - 2 \\times 2)} &= \\frac{\\var{(oint*oint + eint)}}{2}\\text{.} \\end{align}\\]
\nEvaluating the final bracket we get:
\n\\[(10 - 2) = 8\\text{.}\\]
\nAs we evaluated all brackets, we can continue with:
\n\\[\\displaystyle \\frac{\\var{oint}^2+ \\sqrt{\\var{eint*eint}}}{3 \\times 2 - 2 \\times 2} + (10 - 2) \\div \\var{pint} = \\frac{\\var{(oint*oint + eint)}}{2} + 8 \\div \\var{pint} \\]
\nNow, division has a priority over addition so since $\\frac{\\var{(oint*oint + eint)}}{2} = \\var{(oint*oint + eint)/2}$ and $8 \\div \\var{pint} = \\var{8/pint}$:
\n\\[\\begin{align} \\frac{\\var{(oint*oint + eint)}}{2} + 8 \\div \\var{pint} &= \\var{(oint*oint + eint)/2} + \\var{8/pint} \\\\&= \\var{(oint*oint + eint)/2 + 8/pint}\\text{.} \\end{align}\\]
\n", "tags": ["BODMAS", "bodmas", "taxonomy"], "preamble": {"js": "", "css": ""}, "rulesets": {}, "functions": {}, "ungrouped_variables": ["int", "sint", "eint", "oint", "pint", "bint"], "statement": "Wrong order of solving operations can often lead to incorrect answers. Therefore, the order in which we carry out a calculation is important.
\nBODMAS is a mnemonic which tells us the correct order in which operations should be carried out:
\n\n\nBrackets ⇒ Ordinals ⇒ Division/Multiplication ⇒ Addition/Subtraction
\n
Apply BODMAS and try to solve these calculations.
", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Use the BODMAS rule to determine the order in which to evaluate some arithmetic expressions.
"}, "variablesTest": {"condition": "", "maxRuns": 100}}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": [], "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "inreview"}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "type": "exam", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": [], "custom_part_types": [], "resources": [["question-resources/drawingresize_grbP9s8.svg", "/srv/numbas/media/question-resources/drawingresize_grbP9s8.svg"]]}