// Numbas version: finer_feedback_settings {"name": "2. Calculation with numbers", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "2. Calculation with numbers", "tags": [], "metadata": {"description": "

Find reciprocal. Find a modulus. Find a factorial. Part of HELM Book 1.1

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

2 Calculation with numbers

\n\n

To perform calculations with numbers we use the operations , \\(+,\\; -,\\;\\times\\;\\) and \\(\\div\\)

\n

2.1 Addition ( \\(+\\) )

\n

\n

We say that \\(4+5\\) is the sum of \\(4\\) and \\(5\\). Note that \\(4+5\\) is equal to \\(5+4\\) so that the order in which we write down the numbers does not matter when we are adding them. Because the order does not matter, addition is said to be commutative . This first property is called commutativity .

\n

\n

When more than two numbers are to be added, as in \\(4+8+9\\) , it makes no difference whether we add the \\(4\\) and \\(8\\) first to get \\(12+9\\) , or whether we add the \\(8\\) and \\(9\\) first to get \\(4+17\\) . Whichever way we work we will obtain the same result, \\(21\\). Addition is said to be associative . This second property is called associativity .

\n

\n

2.2 Subtraction ( \\(-\\) )

\n

\n

We say that \\(8-3\\) is the difference of \\(8\\) and \\(3\\) . Note that \\(8-3\\) is not the same as \\(3-8\\) and so the order in which we write down the numbers is important when we are subtracting them i.e. subtraction is not commutative. Subtracting a negative number is equivalent to adding a positive number, thus \\(7-(-3)=7+3=10\\) .

\n

\n

2.3 The plus or minus sign ( \\(\\pm\\) )

\n

\n

In engineering calculations we often use the notation plus or minus , \\(\\pm\\) . For example, we write \\(12\\pm 8\\) as shorthand for the two numbers \\(12+8\\) and \\(12-8\\) , that is \\(20\\) and \\(4\\). If we say a number lies in the range \\(12\\pm 8\\) we mean that the number can lie between \\(4\\) and \\(20\\) inclusive.

\n

\n

2.4 Multiplication ( \\(\\times\\) )

\n

\n

The instruction to multiply, or obtain the product of, the numbers \\(6\\) and \\(7\\) is written \\(6\\times 7\\) . Sometimes the multiplication sign is missed out altogether and we write \\((6)(7)\\) .

\n

\n

Note that \\((6)(7)\\) is the same as \\((7)(6)\\) so multiplication of numbers is commutative. If we are multiplying three numbers, as in \\(2\\times 3\\times 4\\) , we obtain the same result whether we multiply the \\(2\\) and \\(3\\) first to obtain \\(6\\times 4\\) , or whether we multiply the \\(3\\) and \\(4\\) first to obtain \\(2\\times 12\\) . Either way the result is \\(24\\). Multiplication of numbers is associative.

\n

\n

Recall that when multiplying positive and negative numbers the sign of the result is given by the rules given in Key Point 1.

\n
\n
Key Point 1
\n

Multiplication

\n

When multiplying numbers:

\n
\n\n
\n
\n

\n

For example, \\((-4)\\times 5=-20\\) , and \\((-3)\\times (-6)=18\\) .

\n

\n

When dealing with fractions we sometimes use the word ‘of’ as in ‘find \\(\\frac12\\) of \\(36\\)’. In this context ‘of’ is equivalent to multiply, that is

\n

\n

\\(\\frac12\\enspace \\text{of}\\enspace 36\\quad\\text{is equivalent to}\\quad\\frac12\\times 36=18\\)

\n

\n

2.5 Division ( \\(\\div\\) ) or ( \\(/\\) )

\n

\n

The quantity \\(8\\div 4\\) means \\(8\\) divided by \\(4\\) . This is also written as \\(8/4\\) or \\(\\frac84\\) and is known as the quotient of \\(8\\) and \\(4\\) . In the fraction \\(\\frac84\\) the top line is called the numerator and the bottom line is called the denominator . Note that \\(8/4\\) is not the same as \\(4/8\\) and so the order in which we write down the numbers is important. Division is not commutative.

\n

\n

When dividing positive and negative numbers, recall the following rules in Key Point 2 for determining the sign of the result:

\n
\n

\n
\n
Key Point 2
\n

Division

\n

When dividing numbers:

\n
\n
    \n
  • \\(\\displaystyle{\\frac{\\text{positive}}{\\text{positive}} = \\text{ positive}}\\)
  • \n
  • \\(\\displaystyle{\\frac{\\text{positive}}{\\text{negative}} = \\text{ negative}}\\)
  • \n
  • \\(\\displaystyle{\\frac{\\text{negative}}{\\text{positive}} = \\text{ negative}}\\)
  • \n
  • \\(\\displaystyle{\\frac{\\text{negative}}{\\text{negative} }= \\text{ positive}}\\)
  • \n
\n
\n
\n\n

2.6 The reciprocal of a number

\n\n

The reciprocal of a number is found by inverting it. If the number \\(\\frac23\\) is inverted we get \\(\\frac32\\) . So the reciprocal of \\(\\frac23\\) is \\(\\frac32\\) . Because we can write \\(4\\) as \\(\\frac41\\) , the reciprocal of \\(4\\) is \\(\\frac14\\) .

\n
", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "2.6 reciprocal", "definition": "random(2..19)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "2.6 reciprocal", "definition": "random(2..19 except a)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "2.6 reciprocal", "definition": "random(-19..19 except 0)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "2.7 modulus", "definition": "random(-20..20)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "2.7 modulus", "definition": "random(-20..20 except 0)", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "2.7 modulus", "definition": "random(1..20 except f)", "description": "", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "2.7 factorial", "definition": "random(11..13)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "2.7 modulus", "variables": ["d", "f", "g"]}, {"name": "2.6 reciprocal", "variables": ["a", "b", "c"]}, {"name": "2.7 factorial", "variables": ["h"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "2.6 Reciprocal", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the reciprocal of \\(\\frac{\\var{a}}{\\var{b}}\\)?

\n

Answer: [[0]]

\n

What is the reciprocal of \\(\\var{c}\\)?

\n

Answer: [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Fraction reciprocal", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{b}/{a}", "maxValue": "{b}/{a}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Integer reciprocal", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "1/{c}", "maxValue": "1/{c}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "2.7 Modulus", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

2.7 The modulus notation ( \\(|\\quad |\\) )

\n\n

We shall make frequent use of the modulus notation \\(|\\quad |\\) . The modulus of a number is the size of that number regardless of its sign. For example \\(|4|\\) is equal to \\(4\\), and \\(|-3|\\) is equal to \\(3\\). The modulus of a number is thus never negative.

\n

Give the modulus of the following numbers:

\n

\\(\\left|\\var{d}\\right| =\\)[[0]]

\n

\\(\\left|\\frac{\\var{f}}{\\var{g}}\\right| =\\)[[1]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Integer modulus", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "abs({d})", "maxValue": "abs({d})", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Fraction modulus", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "abs({f}/{g})", "maxValue": "abs({f}/{g})", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "2.8 Factorial", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

2.8 The factorial symbol (!)

\n\n

Another commonly used notation is the factorial , denoted by the exclamation mark ‘!’. The number \\(5!\\) , read ‘five factorial’, or ‘factorial five’, is a shorthand notation for the expression \\(5\\times 4\\times 3\\times 2\\times 1\\) , and the number \\(7!\\) is shorthand for \\(7\\times 6\\times 5\\times 4\\times 3\\times 2\\times 1\\) . Note that \\(1!\\) equals \\(1\\), and by convention \\(0!\\) is defined as \\(1\\) also. Your scientific calculator is probably able to evaluate factorials of small integers. It is important to note that factorials only apply to positive integers.

\n
\n
Key Point 3
\n

Factorial notation

\n

If \\(n\\) is a positive integer then \\(n!=n\\times (n-1)\\times (n-2)\\times\\dots 5\\times 4\\times 3\\times 2\\times 1\\)

\n
\n\n
Example 1
\n\n
    \n
  1. Evaluate \\(4!\\) and \\(5!\\) without using a calculator.
  2. \n
  3. Use your calculator to find \\(10!\\).
  4. \n
\n\n
Solution
\n\n
    \n
  1. \\(4!=4\\times 3\\times 2\\times 1=24\\). Similarly \\(5!=5\\times 4\\times 3\\times 2\\times 1=120\\). Note that \\(5!=5\\times 4!=5\\times 24=120\\).
  2. \n
  3. \\(10!=3,628,800\\).
  4. \n
\n

Use your calculator to find \\(\\var{h}!\\)

\n

\\(\\var{h}!=\\)[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Factorial", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{h}!", "maxValue": "{h}!", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "resources": []}]}], "contributors": [{"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}