// Numbas version: finer_feedback_settings {"name": "FY001 - 2021 MOCK A", "metadata": {"description": "

MOCK Exam for FY001-2021

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "duration": 5400, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], [], [], [], [], [], []], "questions": [{"name": "Ugur's copy of Simultaneous Equations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Mark Patterson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5064/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Exercises in solving simultaneous equations with 2 variables.

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

Simultaneous Equations

\n

\n

Solve the following simultaneous equations.

", "advice": "

To solve simultaneous equations, first rewrite the equations in matrix form of $Ab = C$, where the matrix $A$ will contain the coefficients of the equation, $b$ will contain the unknown values and $C$ will contain the constants.

\n

We rearrange $Ab = C$ to get $A^{-1}C = b$.

\n

So, we need to find the inverse of $A$ and multiple it with $C$. This will give us $b$, i.e. the values for $x$ and $y$.

\n

\n

For the first question:

\n

$A = \\simplify{{maA}}$  $b = \\begin{pmatrix}x\\\\y\\end{pmatrix}$ $C = \\begin{pmatrix}\\var{a1}\\\\ \\var{a2}\\end{pmatrix}$

\n

To find the inverse of $A$, switch the elements on the leading diagonal, change the signs on the non-leading diagonal, and divide all elements by the determinant.

\n

The determinant of $A$ is $|A| = (\\var{maA[0][0]}\\times\\var{maA[1][1]}) - (\\var{maA[0][1]}\\times\\var{maA[1][0]}) = \\var{detA}$

\n

The inverse of $A$ is $A^{-1} = \\dfrac{1}{\\var{detA}}\\times\\begin{pmatrix}
\\var{maAA[0][0]} & \\var{maAA[0][1]} \\\\
\\var{maAA[1][0]} & \\var{maAA[1][1]}
\\end{pmatrix} =
\\begin{pmatrix}
\\frac{\\var{maAA[0][0]}}{\\var{detA}} & \\frac{\\var{maAA[0][1]}}{\\var{detA}} \\\\
\\frac{\\var{maAA[1][0]}}{\\var{detA}} & \\frac{\\var{maAA[1][1]}}{\\var{detA}}
\\end{pmatrix}$

\n

\n

Rearranging for $A^{-1}C = b$:

\n

$A^{-1}\\times C = 
\\begin{pmatrix}
\\frac{\\var{maAA[0][0]}}{\\var{detA}} & \\frac{\\var{maAA[0][1]}}{\\var{detA}} \\\\
\\frac{\\var{maAA[1][0]}}{\\var{detA}} & \\frac{\\var{maAA[1][1]}}{\\var{detA}}
\\end{pmatrix}
\\times\\begin{pmatrix}\\var{a1}\\\\ \\var{a2}\\end{pmatrix} =
\\begin{pmatrix}
\\frac{\\var{maAA[0][0]}}{\\var{detA}}\\times\\var{a1} + \\frac{\\var{maAA[0][1]}}{\\var{detA}}\\times\\var{a2} \\\\
\\frac{\\var{maAA[1][0]}}{\\var{detA}}\\times\\var{a1} + \\frac{\\var{maAA[1][1]}}{\\var{detA}}\\times\\var{a2}
\\end{pmatrix} =
\\begin{pmatrix}\\var{ax}\\\\ \\var{ay}\\end{pmatrix}$

\n

Therefore $x = \\var{ax}$ and $y = \\var{ay}$.

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"ax": {"name": "ax", "group": "Ungrouped variables", "definition": "random(1..9)*random(1,1,1,-1)", "description": "", "templateType": "anything", "can_override": false}, "ay": {"name": "ay", "group": "Ungrouped variables", "definition": "random(1..9)*random(1,1,1,-1)", "description": "", "templateType": "anything", "can_override": false}, "maA": {"name": "maA", "group": "Ungrouped variables", "definition": "matrixrandomN(2,2)", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "maA[0][0]*ax + maA[0][1]*ay", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "maA[1][0]*ax + maA[1][1]*ay", "description": "", "templateType": "anything", "can_override": false}, "bx": {"name": "bx", "group": "Ungrouped variables", "definition": "random(1..9)*random(1,1,1,-1)", "description": "", "templateType": "anything", "can_override": false}, "by": {"name": "by", "group": "Ungrouped variables", "definition": "random(1..9)*random(1,1,1,-1)", "description": "", "templateType": "anything", "can_override": false}, "maB": {"name": "maB", "group": "Ungrouped variables", "definition": "matrixrandomN(2,2)", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "maB[0][0]*bx + maB[0][1]*by", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "maB[1][0]*bx + maB[1][1]*by", "description": "", "templateType": "anything", "can_override": false}, "maAA": {"name": "maAA", "group": "Ungrouped variables", "definition": "matrix(\n [maA[1][1], -maA[0][1]],\n [-maA[1][0], maA[0][0]]\n)", "description": "", "templateType": "anything", "can_override": false}, "detA": {"name": "detA", "group": "Ungrouped variables", "definition": "det(maA)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ax", "ay", "maA", "a1", "a2", "bx", "by", "maB", "b1", "b2", "maAA", "detA"], "variable_groups": [], "functions": {"matrixrandomN": {"parameters": [["rows", "integer"], ["columns", "integer"]], "type": "matrix", "language": "jme", "definition": "matrix(repeat(repeat(random(1..9)*(random(1,1,1,-1)),columns),rows))"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify{{maA[0][0]}}x + \\simplify{{maA[0][1]}}y = \\simplify{{a1}}$

\n

$\\simplify{{maA[1][0]}}x +\\simplify{{maA[1][1]}}y = \\simplify{{a2}}$

\n

\n

$x =$ [[0]]

\n

$y =$ [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ax", "maxValue": "ax", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ay", "maxValue": "ay", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify{{maB[0][0]}}x + \\simplify{{maB[0][1]}}y = \\simplify{{b1}}$

\n

$\\simplify{{maB[1][0]}}x +\\simplify{{maB[1][1]}}y = \\simplify{{b2}}$

\n

\n

$x =$ [[0]]

\n

$y =$ [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "bx", "maxValue": "bx", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "by", "maxValue": "by", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Functions: domain and range", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Wan Mekwi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4058/"}], "tags": [], "metadata": {"description": "

Determine the largest possible domain of a rational function.

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

Consider the function \\[ f(x) = \\frac{\\var{a}}{(\\simplify{(x+{b})(x^2+{c})}} \\]

\n

", "advice": "

For this problem, the function will not be defined if the denominator is zero.

\n

a) So, $f(x)$ is not defined if $\\simplify{x+{b}}=0\\implies x=\\simplify{-{b}}$.

\n

b) The largest possible domain is the set of real numbers $\\mathbb{R}$ excluding any numbers where $f$ is not defined. Therefore, the largest possible domain is

\n

$\\mathbb{R}\\backslash \\{\\simplify{-{b}}\\}$. 

", "rulesets": {}, "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..15)", "description": "

Non-zero numbers 

", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-15..15 except 0)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..10)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "(a)", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

State the value of $x$ for which $f(x)$ is NOT defined.

\n

$x=$ [[0]]

\n

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "ansA", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-{b}", "maxValue": "-{b}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "1_n_2", "useCustomName": true, "customName": "(b)", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The largest possible domain for $f$ is:

\n

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["$\\mathbb{R}\\backslash\\{\\var{c}\\}$", "$\\mathbb{R}$", "$\\mathbb{R}\\backslash\\{\\simplify{-{b}}\\}$", "$\\{\\simplify{-{b}}\\}$"], "matrix": [0, 0, "1", 0], "distractors": ["Incorrect answer!", "Incorrect answer!", "", "Incorrect answer!"]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Rational functions: Domain, Range, Inverse", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(15..30)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(15..30 except a)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..9 except a)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(1..20 except b except c)", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(15..30 except t except q)", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(15..30 except s)", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(15..30 except 0)", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "random(15..30 except s)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "k", "q", "s", "t"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Let $f(x) = \\frac{\\var{a}x \\ +\\ \\var{b}}{\\var{c}x\\ +\\ \\var{d}}$. Find the natural domain of $f$, $f^{-1}$ and the natural domain of $f^{-1}$.

\n

Domain of $f$ is all real numbers except [[0]]

\n

$f^{-1}(x) =$ [[1]]

\n

Domain of $f^{-1}$ is all real numbers except [[2]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0.", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(-{d})/{c}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(-{d}x + {b})/({c}x - {a})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a}/{c}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Let $f(x) = \\frac{\\var{s}x \\ -\\ \\var{t}}{\\var{q}x\\ -\\ \\var{k}}$. Find the natural domain of $f$, $f^{-1}$ and the natural domain of $f^{-1}$.

\n

Domain of $f$ is all real numbers except [[0]]

\n

$f^{-1} =$ [[1]]

\n

Domain of $f^{-1}$ is all real numbers except [[2]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0.", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{k}/{q}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({k}x - {t})/({q}x -{s})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{s}/{q}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Domain of a rational function short version", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Given a randomised rational function select the possible ways of writing the domain of the function.

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

Given the real functions below, you should be able to determine their domains. 

", "advice": "

\n

Division is defined for all real numbers except zero. So when a function involves division (such as a rational function), any input that will result in a division by zero is not allowed. Rational functions are simply a fraction/division of polynomials, so the only real numbers that are not in the domain of a rational function are the roots of the polynomial in the denominator. Sometimes, (for example part c above) you will need to factorise the denominator to determine its roots.

\n

\n

d) Even though 'something divided by itself is 1' division by zero is still undefined. So the domain of $h$ is not all of $\\mathbb{R}$, the domain does not include the number $\\var{c[0]}$. In other words, $h(\\var{c[0]})$ is undefined but for all other $r$, $h(r)=1$.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-12..-1)", "description": "", "templateType": "anything", "can_override": false}, "inp": {"name": "inp", "group": "Ungrouped variables", "definition": "expression(random('x','r','s','t','w'))", "description": "", "templateType": "anything", "can_override": false}, "set_of_holes": {"name": "set_of_holes", "group": "Ungrouped variables", "definition": "set(c)", "description": "", "templateType": "anything", "can_override": false}, "out": {"name": "out", "group": "Ungrouped variables", "definition": "expression(random('f','h','g','p','q','y'))", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "a+random(1..12)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "num": {"name": "num", "group": "Ungrouped variables", "definition": "[random(-12..12),random(-12..12 except 0)]", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "sort(shuffle(-12..12)[0..n])", "description": "", "templateType": "anything", "can_override": false}, "rat": {"name": "rat", "group": "Ungrouped variables", "definition": "if(n=3,'\\\\[\\\\simplify{{out}({inp})=({num[0]}{inp}+{num[1]})/(({inp}-{c[0]})({inp}-{c[1]})*({inp}-{c[2]}))}\\\\]',\nif(n=2,'\\\\[\\\\simplify{{out}({inp})=({num[0]}{inp}+{num[1]})/(({inp}-{c[0]})({inp}-{c[1]}))}\\\\]',\n'\\\\[\\\\simplify{{out}({inp})=({num[0]}{inp}+{num[1]})/(({inp}-{c[0]})({inp}-{c[1]})*({inp}-{c[2]})*({inp}-{c[3]}))}\\\\]'))\n \n \n", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["out", "inp", "num", "n", "c", "rat", "a", "b", "set_of_holes"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

There are [[0]] real numbers that are not in the domain of {rat} these are [[1]].

\n

Note: If the numbers were $-2,1$ and $4$ you would enter set(-2,1,4)

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{length(c)}", "maxValue": "{length(c)}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{set_of_holes}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "m_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Which of the following represents the domain of \\[\\simplify{g(x)=(x^2-{c[0]+c[1]}x+{c[0]*c[1]})/(x^2-{a+b}x+{a*b})} \\ ?\\]

\n

(There could be more than one correct choice).

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "checkbox", "displayColumns": "1", "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["

$\\mathbb{R}$

", "

$\\{x\\in \\mathbb{R}:\\,\\var{a+b}<x<\\var{a*b}\\}$

", "

$\\{x\\in \\mathbb{R}:\\,x\\ne \\var{c[0]},\\var{c[1]}\\}$

", "

$\\{x\\in \\mathbb{R}:\\,x\\ne \\var{a},\\var{b}\\}$

", "

$\\mathbb{R}\\setminus \\{\\var{a},\\var{b}\\}$

", "

$\\mathbb{R}\\setminus \\{\\var{c[0]},\\var{c[1]}\\}$

", "

$\\{x\\in \\mathbb{R}:\\,x\\ne \\var{-a},\\var{-b}\\}$

"], "matrix": [0, 0, 0, "1", "1", 0, 0], "distractors": ["", "", "", "", "", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Exponential population growth fully randomised", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Students are given an exponential equation and asked to evaluate it at two points.

\n

The constants in the exponential are randomised.

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

A population of bacteria has a population, $P$, that can be described by the function $P = \\var{k} \\times \\var{a}^t $, where $t$ is the time in {timeperiod}.

", "advice": "

a) When $t=0$,

\n

$  P = \\var{k} \\times \\var{a}^t = \\var{k} \\times \\var{a}^0 = 1$

\n

\n

b) When $t = \\var{time}$,

\n

$P = \\var{k} \\times \\var{a}^\\var{time} = \\var{answer_raw}$

\n

When this is rounded to the nearest whole number, we get

\n

$P = \\var{answer}$

\n

\n

c) We need to take $t = -2$,

\n

$P = \\var{k} \\times \\var{a}^{-2} = \\var{ansc}$,

\n

When this is rounded to the nearest whole number, we get

\n

$P = \\var{ansc_r}$.

\n

\n

d) We need to solve the following equation:

\n

\\[\\var{l} = \\var{k} \\times \\var{a}^t\\]

\n

for $t$. Take the appropriate logarithm on both sides 

\n

\\[log_{\\var{a}}(\\var{l}/\\var{k}) = \\var{ansd}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"objectchoice": {"name": "objectchoice", "group": "Ungrouped variables", "definition": "random(0..4)", "description": "", "templateType": "anything", "can_override": false}, "timeperiodlist": {"name": "timeperiodlist", "group": "Ungrouped variables", "definition": "['days','weeks','months','years']", "description": "", "templateType": "anything", "can_override": false}, "timeperiodchoice": {"name": "timeperiodchoice", "group": "Ungrouped variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}, "timeperiod": {"name": "timeperiod", "group": "Ungrouped variables", "definition": "timeperiodlist[timeperiodchoice]", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(1..10000)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "1 + random(10..70)/100", "description": "", "templateType": "anything", "can_override": false}, "time": {"name": "time", "group": "Ungrouped variables", "definition": "random(2..15)", "description": "", "templateType": "anything", "can_override": false}, "answer_raw": {"name": "answer_raw", "group": "Ungrouped variables", "definition": "k*a^time", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "Ungrouped variables", "definition": "round(answer_raw)", "description": "", "templateType": "anything", "can_override": false}, "l": {"name": "l", "group": "Ungrouped variables", "definition": "random(k+2000, k+2500, k+3000, k+3500)", "description": "", "templateType": "anything", "can_override": false}, "ansc": {"name": "ansc", "group": "Ungrouped variables", "definition": "k*(a^(-2))", "description": "", "templateType": "anything", "can_override": false}, "ansc_r": {"name": "ansc_r", "group": "Ungrouped variables", "definition": "round(ansc)", "description": "", "templateType": "anything", "can_override": false}, "ansd": {"name": "ansd", "group": "Ungrouped variables", "definition": "log(l/k,a)", "description": "", "templateType": "anything", "can_override": false}, "time1": {"name": "time1", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["objectchoice", "timeperiodlist", "timeperiodchoice", "timeperiod", "k", "a", "time", "answer_raw", "answer", "l", "ansc", "ansc_r", "ansd", "time1"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the initial population, $P$, when $t$ = 0?

", "minValue": "{k}", "maxValue": "{k}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the population, $P$, when $t = \\var{time}$ {timeperiod}

\n

Round your answer to the nearest whole number.

", "minValue": "round({k}*{a}^{time})", "maxValue": "round({k}*{a}^{time})", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What was the population, $P$, {time1} {timeperiod} ago

\n

Round your answer to the nearest whole number.

\n

[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "gap 0", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "round({k}*{a}^{-time1})", "maxValue": "round({k}*{a}^{-time1})", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

When the population will reach $P=\\var{l}$. Give your answer accurate to 3 decimal places. 

\n

$t =$[[0]] {timeperiod}

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "gap 1", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "log({l}/{k}, a)", "maxValue": "log({l}/{k}, a)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "NC Math 3 Solve an exponential decay problem -- Depreciation", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}], "ungrouped_variables": ["A", "r", "rPercent", "dFactor", "tDepreciate", "valueNow"], "parts": [{"customMarkingAlgorithm": "", "displayAnswer": "Decay", "scripts": {}, "unitTests": [], "showFeedbackIcon": true, "prompt": "

Is the value of the truck exponential growth or decay?

", "answer": "decay", "showCorrectAnswer": true, "type": "patternmatch", "customName": "", "marks": 1, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "matchMode": "exact", "adaptiveMarkingPenalty": 0, "variableReplacements": []}, {"customMarkingAlgorithm": "", "scripts": {}, "unitTests": [], "gaps": [{"correctAnswerFraction": false, "showFractionHint": true, "type": "numberentry", "maxValue": "A", "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "useCustomName": false, "mustBeReduced": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "minValue": "A", "scripts": {}, "mustBeReducedPC": 0, "customName": "", "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": 1, "unitTests": [], "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false}], "showFeedbackIcon": true, "prompt": "

What is the original value of the truck?

\n

$\\$$[[0]]

", "showCorrectAnswer": true, "type": "gapfill", "customName": "", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "sortAnswers": false, "adaptiveMarkingPenalty": 0, "variableReplacements": []}, {"customMarkingAlgorithm": "", "displayAnswer": "{rPercent}%", "scripts": {}, "unitTests": [], "showFeedbackIcon": true, "prompt": "

What is the growth or decay rate as a percent?

", "answer": "{rPercent}%", "showCorrectAnswer": true, "type": "patternmatch", "customName": "", "marks": 1, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "matchMode": "exact", "adaptiveMarkingPenalty": 0, "variableReplacements": []}, {"customMarkingAlgorithm": "", "scripts": {}, "unitTests": [], "gaps": [{"correctAnswerFraction": false, "precisionPartialCredit": "50", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "precisionType": "dp", "type": "numberentry", "maxValue": "valueNow", "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "useCustomName": false, "precision": "2", "adaptiveMarkingPenalty": 0, "showPrecisionHint": false, "customMarkingAlgorithm": "", "minValue": "valueNow", "scripts": {}, "mustBeReducedPC": 0, "precisionMessage": "Money always is expressed with two decimal places.", "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "strictPrecision": true, "marks": 1, "unitTests": [], "variableReplacementStrategy": "originalfirst", "customName": "", "allowFractions": false}], "showFeedbackIcon": true, "prompt": "

What is the value of the truck $\\var{tDepreciate}$ years after it was built?

\n

$\\$$[[0]]

", "showCorrectAnswer": true, "type": "gapfill", "customName": "", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "sortAnswers": false, "adaptiveMarkingPenalty": 0, "variableReplacements": []}], "functions": {}, "advice": "", "preamble": {"js": "", "css": ""}, "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"tDepreciate": {"group": "Ungrouped variables", "definition": "random(2..6)", "name": "tDepreciate", "description": "", "templateType": "anything"}, "dFactor": {"group": "Ungrouped variables", "definition": "1-r", "name": "dFactor", "description": "", "templateType": "anything"}, "r": {"group": "Ungrouped variables", "definition": "random(0.1..0.25#0.01)", "name": "r", "description": "", "templateType": "anything"}, "rPercent": {"group": "Ungrouped variables", "definition": "100*r", "name": "rPercent", "description": "", "templateType": "anything"}, "valueNow": {"group": "Ungrouped variables", "definition": "precround(A*(dFactor)^tDepreciate,2)", "name": "valueNow", "description": "", "templateType": "anything"}, "A": {"group": "Ungrouped variables", "definition": "random(40000..80000)", "name": "A", "description": "", "templateType": "anything"}}, "tags": [], "statement": "

The value, $y$, of a truck can be modeled by $ y = \\var{A}(\\var{dFactor})^t $, where $t$ is the number of years since the truck was built.

", "rulesets": {}, "variable_groups": [], "metadata": {"licence": "All rights reserved", "description": ""}, "type": "question"}, {"name": "Logarithms: Using the Rules", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "steve kilgallon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/268/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Practice using the log rules to add and subtract logarithms

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

Express each of the following as a single logarithm

\n

(Remember that when you see $\\log(x)$ we are talking about $\\log_{10}(x)$)

\n

", "advice": "

Use of the laws of logarithms is crucial here:

\n

$\\log{a} + \\log{b} = \\log{ab}$

\n

$\\log{a} - \\log{b} = \\log{\\frac{a}{b}}$

\n

$\\log{a^n} = n\\log{a}$

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"f2": {"name": "f2", "group": "Ungrouped variables", "definition": "random(3..5 except f1)", "description": "", "templateType": "anything", "can_override": false}, "f3": {"name": "f3", "group": "Ungrouped variables", "definition": "f1*f2", "description": "", "templateType": "anything", "can_override": false}, "f4": {"name": "f4", "group": "Ungrouped variables", "definition": "f2-1", "description": "", "templateType": "anything", "can_override": false}, "f1": {"name": "f1", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "f5": {"name": "f5", "group": "Ungrouped variables", "definition": "f1^2", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "precround(log(c),4)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "f1*f3/f5", "description": "", "templateType": "anything", "can_override": false}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.0001", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["f1", "f2", "f3", "f4", "f5", "ans", "c", "tol"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

If $\\log{\\var{f1}} + \\log{\\var{f3}} - \\log{\\var{f5}} = \\log(c)$, find c

\n

$c = $ [[1]]. Input your answer as an integer or a fraction.

\n

Now, compute $\\log(c)$ to 4 decimal places

\n

$\\log(c) = $ [[0]]

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{ans-tol}", "maxValue": "{ans+tol}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{f1*f3}/{f5}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Ugur's copy of Using the Logarithm Equivalence $\\log_ba=c \\Longleftrightarrow a=b^c$", "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": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Rearrange some expressions involving logarithms by applying the relation $\\log_b(a) = c \\iff a = b^c$.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "

a)

\n

i)

\n

We can rearrange logarithms using indices. 

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\]

\n

Using this equivalence we can rewrite $\\log_\\var{f}x=\\var{f1}$.

\n

\\[\\begin{align}
x&= \\var{f}^\\var{f1} \\\\
&=\\var{f^f1}
\\end{align}\\]

\n

\n

b)

\n

i)

\n

We can use the equivalence to rewrite our equation.

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\]

\n

We can write out our values to makes it easier.

\n

\\[\\begin{align}
a&=x \\\\
b&=\\var{g1}\\\\
c&=y+\\var{g2}
\\end{align}\\]

\n

Then we can write out our equation in the required form.

\n

\\[x=\\var{g1}^{y+\\var{g2}}\\]

\n

\n

c)

\n

We can use the same equivalence as in part b)

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\]

\n

We have

\n

\\begin{align}
a&=y+\\var{h1} \\\\
b&=x\\\\
c&=\\var{h2}\\text{.} \\\\ \\\\
\\log_{x}(y+\\var{h1}) &= \\var{h2} \\\\
\\implies y+\\var{h1} &= x^{\\var{h2}} \\\\
x &= (y+\\var{h1})^{\\frac{1}{\\var{h2}}}
\\end{align}

\n

\n

d) 

\n

The two in this list that don't equal $x$ are $\\log_e(x)$ and $\\log_{10}(x)$.

\n

\\[\\begin{align}
\\log_e(x)&=\\ln(x)\\\\
\\log_{10}(x)&=\\log(x)\\text{.}
\\end{align}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"h2": {"name": "h2", "group": "part3", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "f3": {"name": "f3", "group": "Ungrouped variables", "definition": "random(3..8)", "description": "", "templateType": "anything", "can_override": false}, "h1": {"name": "h1", "group": "part3", "definition": "random(1..10 except h2)", "description": "", "templateType": "anything", "can_override": false}, "g2": {"name": "g2", "group": "part 2", "definition": "random(2..10except g1)", "description": "", "templateType": "anything", "can_override": false}, "f2": {"name": "f2", "group": "Ungrouped variables", "definition": "random(2..10 except f3 f)", "description": "", "templateType": "anything", "can_override": false}, "f5": {"name": "f5", "group": "Ungrouped variables", "definition": "random(2..6 except f1)", "description": "", "templateType": "anything", "can_override": false}, "f4": {"name": "f4", "group": "Ungrouped variables", "definition": "random(5..12 except f2 f)", "description": "", "templateType": "anything", "can_override": false}, "f1": {"name": "f1", "group": "Ungrouped variables", "definition": "random(2..5 except f)", "description": "", "templateType": "anything", "can_override": false}, "g1": {"name": "g1", "group": "part 2", "definition": "random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "g3": {"name": "g3", "group": "part 2", "definition": "random(2..10except g1 g2)", "description": "", "templateType": "anything", "can_override": false}, "g4": {"name": "g4", "group": "part 2", "definition": "random(2..10except g1 g2 g3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["f", "f2", "f1", "f3", "f4", "f5"], "variable_groups": [{"name": "part 2", "variables": ["g3", "g2", "g4", "g1"]}, {"name": "part3", "variables": ["h1", "h2"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Rearrange the equation to find $x$.

\n

$\\log_\\var{f}(x)=\\var{f1}$ 

\n

$x=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{f^f1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Make $x$ the subject of the following equation.

\n

$\\log_\\var{g1}(x)=y+\\var{g2}$

\n

$x=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{g1}^(y+{g2})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Make $x$ the subject of the equation, leaving your answer in the form $a^{\\frac{1}{b}}$.

\n

$\\log_x(y+\\var{h1})=\\var{h2}$

\n

$x=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(y+{h1})^(1/{h2})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "m_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Which of the following expressions are equivalent to $x$?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "checkbox", "displayColumns": 0, "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["

$\\log_a(a^x)$

", "

$a^{\\log_a(x)}$

", "

$e^{\\ln(x)}$

", "

$\\log_{10}(x)$

", "

$\\log_e(x)$

", "

$\\ln(e^x)$

"], "matrix": ["1", "1", "1", "-5", "-5", "1"], "distractors": ["", "", "", "", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Ugur's copy of Write down and apply the formula for an arithmetic sequence.", "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": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Given the first few terms of an arithmetic sequence, write down its formula, then find a couple of particular terms.

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

In this question, consider the sequence

\n

\\[ a = \\var{a1}, \\; \\var{a1+d}, \\; \\var{a1+d*2}, \\; \\var{a1+d*3}, \\; \\ldots \\]

\n

A helpful person has drawn out a table of the terms so far.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\boldsymbol{n}$$1$$2$$3$$4$$\\ldots$
$\\boldsymbol{a_n}$$\\var{a1}$$\\var{a1+d}$$\\var{a1+2d}$$\\var{a1+3d}$$\\ldots$
", "advice": "

The formula for the $n^\\text{th}$ term, $a_n$, of an arithmetic sequence is

\n

\\[ a_n=a_1+(n-1)d \\text{.} \\]

\n

$a_1$ is the first term, and $d$ is the common difference between adjacent terms.

\n

a)

\n

In the given sequence, the common difference is $\\var{a1+d} - \\var{a1} = \\var{d}$, and the first term is $\\var{a1}$.

\n

So, the formula for this sequence is

\n

\\[ a_n = \\var{a1} + (n-1) \\times \\var{d} \\text{.} \\]

\n

b)

\n

\\[ a_\\var{small} = \\var{a1} + (\\var{small}-1) \\times \\var{d} = \\var{a1+(small-1)*d} \\text{.} \\]

\n

c)

\n

\\[ a_\\var{large} = \\var{a1} + (\\var{large}-1) \\times \\var{d} = \\var{a1+(large-1)*d} \\text{.} \\]

\n

d) 

\n

\\[S_n = \\frac{n(a_1 + a_n)}{2}\\] 

\n

Plug in the values to get $S_{\\var{medium}} = \\frac{\\var{medium}(\\var{a1} + \\var{amed})}{2} = \\var{ansd} $

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"large": {"name": "large", "group": "Ungrouped variables", "definition": "random(10..50#5)*10", "description": "

A large index to compute

", "templateType": "anything", "can_override": false}, "small": {"name": "small", "group": "Ungrouped variables", "definition": "random(6..10)", "description": "

A small index to compute

", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(1..90)", "description": "

The first term in the sequence

", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(3..13 except 10)", "description": "", "templateType": "anything", "can_override": false}, "medium": {"name": "medium", "group": "Ungrouped variables", "definition": "random(10..20)", "description": "", "templateType": "anything", "can_override": false}, "amed": {"name": "amed", "group": "Ungrouped variables", "definition": "a1+(medium-1)*d", "description": "", "templateType": "anything", "can_override": false}, "ansd": {"name": "ansd", "group": "Ungrouped variables", "definition": "(medium*(a1 + amed))/2", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a1", "d", "small", "large", "medium", "amed", "ansd"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Write out an expression for $a_n$, the $n^{\\text{th}}$ term of the sequence, in terms of $n$.

\n

$a_n =$ [[0]]

\n

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a1}+(n-1){d}", "answerSimplification": "basic", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "n", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

\n

Find the $\\var{small}^{\\text{th}}$ term

\n

$a_{\\var{small}} = $ [[0]]

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "a1+(small-1)*d", "maxValue": "a1+(small-1)*d", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Find the $\\var{large}^{\\text{th}}$ term

\n

$a_{\\var{large}} = $[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "a1+(large-1)*d", "maxValue": "a1+(large-1)*d", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Find the sum of first $\\var{medium}$ terms.

\n

$S_{\\var{medium}} =$ [[0]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "gap sum", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "({medium}*({a1} + {amed}))/2", "maxValue": "({medium}*({a1} + {amed}))/2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Ugur's copy of Percentages and ratios - box of chocolates", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Adelle Colbourn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2083/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

A simple situational question about a box of chocolates, asking how many of each type there are, what percentage of the box they represent, the probability of picking one and ratios of different types.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "
\n
\n
\n

", "advice": "
\n

a)

\n

100% represents the whole box of chocolates. As there are 5 different kinds of chocolate in the box and they are all represented equally, to calculate the percentage chocolates which are caramel, divide 100 by 5.

\n

Caramel chocolate = $\\displaystyle\\frac{100}{5}$ = $20$% of the box.

\n

\n

\n

b) 

\n

The original number of chocolates in the box is stated. We worked out above that each type of chocolate makes up 20% of the box, so we need to work out 20% of {chocs}.

\n

To do this, either divide {chocs} by 100 and multiply by 20, OR multiply {chocs} by 0.2. The two methods will give the same result.

\n

Method 1: $\\displaystyle\\frac{\\var{chocs}}{100}$ x $20$ = $\\var{type}$;

\n

OR

\n

Method 2: $\\var{chocs}$ x $0.2$ = $\\var{type}$.

\n

\n

\n

c)

\n

There are now {type} fewer chocolates in the box, but the remaining chocolates now represent 100% of the box. There are now only 4 types of chocolate in it and there is still equal representation inside the box.

\n

Use the method from part a) to find out the equal share of each chocolate type.

\n

Each type = $\\displaystyle\\frac{100}{4}$ = $25$% of the box.

\n

\n

\n

d) 

\n

i)

\n

The first section asks you to compare plain chocolate and dark chocolate. It states that there are {p} plain chocolates and {d} dark chocolates left in the box.

\n

Insert the numbers of each into the gaps.

\n

Plain $\\var{p}$ : $\\var{d}$ Dark

\n

From this, we should look to see if this answer can be simplified down. To do this, we need to find the greatest common divisor of $\\var{p}$ and $\\var{d}$. 

\n

The greatest common divisor is $\\var{gcd}$.

\n

Using this value to simplify down the ratio by dividing each term by the value, the final answer is

\n

Plain $\\var{ratio_plain}$ : $\\var{ratio_dark}$ Dark.

\n

This states that for every {ratio_plain} plain {if(ratio_plain=1,\"chocolate\",\"chocolates\")}, there {if(ratio_dark=1,\"is\",\"are\")} {ratio_dark} dark {if(ratio_dark=1,\"chocolate\",\"chocolates\")}.

\n

Therefore, it is not possible to simplify further and the final answer is

\n

Plain $\\var{p}$ : $\\var{d}$ Dark.

\n

This states that for every {p} plain {if(p=1,\"chocolate\",\"chocolates\")}, there {if(d=1,\"is\",\"are\")}{d} dark {if(d=1,\"chocolate\",\"chocolates\")}.

\n

\n

ii)

\n

The second section asks you to compare coconut chocolates and the rest of the box. It states that there are {c} coconut chocolates. To calculate the number of chocolates in the rest of the box, add together the stated amounts of plain, dark and nutty chocolates:

\n

$\\var{p}+\\var{d}+\\var{n}$ = $\\var{rob}$.

\n

Insert these two figures into the gaps.

\n

Coconut $\\var{c}$ : $\\var{rob}$ Other chocolates

\n

From this, we should look to see if this answer can be simplified down. To do this, we need to find the greatest common divisor of $\\var{c}$ and $\\var{rob}$. 

\n

The greatest common divisor is $\\var{gcd2}$.

\n

Using this value to simplify down the ratio by dividing each term by the value, the final answer is

\n

Coconut $\\var{ratio_coconut}$ : $\\var{ratio_rest}$ Other chocolates.

\n

This states that for every {ratio_coconut} coconut {if(ratio_coconut=1,\"chocolate\",\"chocolates\")}, there {if(ratio_rest=1,\"is\",\"are\")} {ratio_rest} other {if(ratio_rest=1,\"chocolate\",\"chocolates\")} in the box.

\n

Therefore, it is not possible to simplify further and the final answer is 

\n

Coconut $\\var{c}$ : $\\var{rob}$ Other chocolates.

\n

This states that for every {c} coconut {if(c=1,\"chocolate\",\"chocolates\")}, there {if(rob=1,\"is\",\"are\")} {rob} other {if(rob=1,\"chocolate\",\"chocolates\")} in the box.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"ratio_dark": {"name": "ratio_dark", "group": "Ungrouped variables", "definition": "d/gcd(p,d)", "description": "
\n

Number of dark chocolates in ratio of plain to dark.

", "templateType": "anything", "can_override": false}, "prob": {"name": "prob", "group": "Ungrouped variables", "definition": "precround({n/{a},2)", "description": "
\n

Probability that a nutty chocolate is selected from the box on day 3.

", "templateType": "anything", "can_override": false}, "type": {"name": "type", "group": "Ungrouped variables", "definition": "chocs/5", "description": "
\n

Number of each type of chocolate in the box initially.

", "templateType": "anything", "can_override": false}, "minusc": {"name": "minusc", "group": "Ungrouped variables", "definition": "{chocs-type}", "description": "
\n

Number of chocolates in the box minus caramel.

", "templateType": "anything", "can_override": false}, "chocs": {"name": "chocs", "group": "Ungrouped variables", "definition": "random(70 .. 95#5)", "description": "
\n
\n

Total number of chocolates in the box before eating.

", "templateType": "randrange", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "p+n+d+c", "description": "
\n
\n

Number of chocolates in the box on day 3.

", "templateType": "anything", "can_override": false}, "gcd2": {"name": "gcd2", "group": "Ungrouped variables", "definition": "gcd(c,rob)", "description": "
\n

", "templateType": "anything", "can_override": false}, "perc": {"name": "perc", "group": "Ungrouped variables", "definition": "100*(prob)", "description": "
\n

Percentage version of probability.

", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(1..14 except 7 except 11 except 13)", "description": "
\n
\n

Number of nutty chocolates on day 3.

", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(1..3)*p", "description": "
\n
\n

Number of dark chocolates on day 3.

", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "
\n
\n

Number of plain chocolates on day 3.

", "templateType": "anything", "can_override": false}, "ratio_coconut": {"name": "ratio_coconut", "group": "Ungrouped variables", "definition": "c/gcd(c, rob)", "description": "
\n

Number of coconut chocolates in ratio of coconut to rest of box.

", "templateType": "anything", "can_override": false}, "ratio_plain": {"name": "ratio_plain", "group": "Ungrouped variables", "definition": "p/gcd(p,d)", "description": "
\n

Number of plain chocolates in ratio of plain to dark.

", "templateType": "anything", "can_override": false}, "rob": {"name": "rob", "group": "Ungrouped variables", "definition": "p+n+d", "description": "
\n
\n
\n

Sum of the rest of the box excluding coconut.

", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..14 except 7 except 11 except 13)", "description": "
\n
\n
\n

Number of coconut chocolates on day 3.

", "templateType": "anything", "can_override": false}, "ratio_rest": {"name": "ratio_rest", "group": "Ungrouped variables", "definition": "rob/gcd(c, rob)", "description": "
\n

Number of 'rest of box' chocolates in ratio of coconut to rest of box.

", "templateType": "anything", "can_override": false}, "gcd": {"name": "gcd", "group": "Ungrouped variables", "definition": "gcd(p,d)", "description": "
\n

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["chocs", "type", "p", "n", "d", "c", "rob", "prob", "a", "perc", "minusc", "ratio_plain", "ratio_dark", "ratio_coconut", "ratio_rest", "gcd", "gcd2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "
\n
\n

A family receive a box of chocolates as a gift. There are five different kinds of chocolate inside, plain, nut, caramel, dark and coconut.

\n

There are:

\n

$\\var{p}$ plain chocolates, $\\var{n}$ nutty chocolates, $\\var{c}$ coconut chocolates and $\\var{d}$ dark chocolates.

\n

\n

i) What is the probability of picking a plain chocolate 

\n

[[0]] Give your answer as fraction!

\n

\n

ii) What is the probablity of picking a coconut chocolate.

\n

[[1]] Give your answer as fraction!

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0.", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{p}/{p+n+d+c}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{c}/{p+n+c+d}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Ugur's copy of Mean, median, mode", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "David Goulding", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2365/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "
\n

Topics covered are calculating the mean, median, mode.

\n
", "licence": "None specified"}, "statement": "

The number of new cases of Covid-19 in Cork City over a number of days is shown below. Calculate the mean, median and mode of the data:

\n

{numbers}

", "advice": "

Mean: $\\mu = \\frac{1}{N}\\sum\\limits_{i=1}^N x_i$

\n

Median: middle value

\n

Mode: most common value

", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"number": {"name": "number", "group": "Ungrouped variables", "definition": "shuffle(1..30)[0..x]", "description": "", "templateType": "anything", "can_override": false}, "mean": {"name": "mean", "group": "Ungrouped variables", "definition": "mean(numbers)", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "max(numbers)", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "min(numbers)", "description": "", "templateType": "anything", "can_override": false}, "median": {"name": "median", "group": "Ungrouped variables", "definition": "median(numbers)", "description": "", "templateType": "anything", "can_override": false}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "random(18..20)", "description": "", "templateType": "anything", "can_override": false}, "numbers": {"name": "numbers", "group": "Ungrouped variables", "definition": "number+number[6]", "description": "", "templateType": "anything", "can_override": false}, "mode": {"name": "mode", "group": "Ungrouped variables", "definition": "mode(numbers)", "description": "", "templateType": "anything", "can_override": false}, "sort_num": {"name": "sort_num", "group": "Ungrouped variables", "definition": "sort(numbers)", "description": "", "templateType": "anything", "can_override": false}, "lq": {"name": "lq", "group": "Ungrouped variables", "definition": "if(isint((x+2)/4),sort_num[((x+2)/4)-1],(sort_num[floor((x+2)/4)-1]+sort_num[ceil((x+2)/4)-1])/2)", "description": "", "templateType": "anything", "can_override": false}, "test1": {"name": "test1", "group": "Ungrouped variables", "definition": "sort_num[1]", "description": "", "templateType": "anything", "can_override": false}, "test2": {"name": "test2", "group": "Ungrouped variables", "definition": "sort_num[2]", "description": "", "templateType": "anything", "can_override": false}, "uq": {"name": "uq", "group": "Ungrouped variables", "definition": "if(isint(3*(x+2)/4),sort_num[3*((x+2)/4)-1],(sort_num[floor(3*(x+2)/4)-1]+sort_num[ceil(3*(x+2)/4)-1])/2)", "description": "", "templateType": "anything", "can_override": false}, "test3": {"name": "test3", "group": "Ungrouped variables", "definition": "sort_num[7]", "description": "", "templateType": "anything", "can_override": false}, "test4": {"name": "test4", "group": "Ungrouped variables", "definition": "sort_num[8]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["number", "mean", "a1", "a2", "median", "x", "numbers", "mode", "sort_num", "lq", "test1", "test2", "uq", "test3", "test4"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\text{mean}=\\;\\;$[[0]]

\n

Enter decimal answers to 1 decimal place.

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "mean", "maxValue": "mean", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "1", "precisionPartialCredit": "0", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\text{median}=\\;\\;$[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 2, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "median", "maxValue": "median", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\text{mode}=\\;\\;$[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{number[6]}", "maxValue": "{number[6]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}], "allowPrinting": true, "navigation": {"allowregen": false, "reverse": true, "browse": true, "allowsteps": false, "showfrontpage": true, "showresultspage": "review", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": false, "timeout": {"action": "warn", "message": "

You run our of time!

"}, "timedwarning": {"action": "warn", "message": "

LAST 5 MINUTES!

"}}, "feedback": {"showactualmark": false, "showtotalmark": true, "showanswerstate": false, "allowrevealanswer": false, "advicethreshold": 0, "intro": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": false, "feedbackmessages": [], "enterreviewmodeimmediately": false, "showexpectedanswerswhen": "never", "showpartfeedbackmessageswhen": "inreview", "showactualmarkwhen": "inreview", "showtotalmarkwhen": "always", "showanswerstatewhen": "inreview", "showadvicewhen": "never"}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "type": "exam", "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}