// Numbas version: exam_results_page_options {"navigation": {"browse": true, "startpassword": "", "showfrontpage": true, "showresultspage": "oncompletion", "preventleave": true, "allowregen": false, "reverse": true, "onleave": {"action": "none", "message": ""}}, "showstudentname": true, "showQuestionGroupNames": true, "duration": 3600, "feedback": {"allowrevealanswer": true, "feedbackmessages": [], "intro": "

Thank you for participating

", "showanswerstate": true, "showactualmark": true, "showtotalmark": true, "advicethreshold": 0}, "name": "Essential Maths exam", "metadata": {"description": "This is for testing purposes only", "licence": "All rights reserved"}, "question_groups": [{"pickingStrategy": "all-ordered", "name": "Sample ", "pickQuestions": 1, "questions": [{"name": "Expansion of brackets", "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": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}], "tags": ["brackets", "expanding brackets", "expansion of brackets", "simplifying algebraic expressions", "simplifying expressions", "taxonomy"], "metadata": {"description": "

This question is made up of 10 exercises to practice the multiplication of brackets by a single term.

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

Expand the expressions below by multiplying each of the terms inside the brackets by the term outside. Give each answer in its simplest form.

", "advice": "

Expand brackets using the general formula $\\displaystyle a(x+c)=ax+ac$. This means we multiply each term inside the brackets by the term outside the brackets.

\n

It is easy to forget that the sign outside the brackets also needs to be involved in the multiplication so remember that when two of the same sign are multiplied, the resultant term is positive and when opposite signs are multiplied, the result is negative.

\n

a)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[1]}({a[2]}x+{a[3]})}&=
\\simplify[!collectNumbers]{({a[1]}{a[2]})x+({a[1]}{a[3]})}\\\\&
=\\simplify{{a[1]}*{a[2]}x+{a[1]}{a[3]}}\\text{.}
\\end{align}
\\]

\n

b)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[4]}({a[5]}x+{a[6]})}&=
\\simplify[!collectNumbers]{{a[4]}{a[5]}x+{a[4]}{a[6]}}\\\\&=
\\simplify{{a[4]}*{a[5]}x+{a[4]}{a[6]}}\\text{.}
\\end{align}
\\]

\n

c)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[7]}({a[8]}x^2+{a[9]}y)}&=
\\simplify[!collectNumbers]{{a[7]}{a[8]}x^2+{a[7]}{a[9]}y}\\\\&=
\\simplify{{a[7]}*{a[8]}x^2+{a[7]}*{a[9]}y}\\text{.}
\\end{align}
\\]

\n

d)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[10]}({a[11]}x^2+{a[12]}y)}&=
\\simplify[!collectNumbers]{{a[10]}{a[11]}x^2+{a[10]}{a[12]}y}\\\\&=
\\simplify{{a[10]}*{a[11]}x^2+{a[10]}*{a[12]}y}\\text{.}
\\end{align}
\\]

\n

e)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[13]}x({a[14]}x^2+{a[15]}x+{a[16]})}&=
\\simplify[!collectNumbers]{{a[13]}x{a[14]}x^2+{a[13]}x{a[15]}x+{a[13]}x{a[16]}}\\\\&=
\\simplify{{a[13]}{a[14]}x^3+{a[13]}{a[15]}x^2+{a[13]}{a[16]}x}\\text{.}
\\end{align}
\\]

\n

f)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[17]}x({a[18]}x^2+{a[19]}x+{a[20]})}&=
\\simplify[!collectNumbers]{{a[17]}x{a[18]}x^2+{a[17]}x{a[19]}x+{a[17]}x{a[20]}}\\\\&=
\\simplify{{a[17]}{a[18]}x^3+{a[17]}{a[19]}x^2+{a[17]}{a[20]}x}\\text{.}
\\end{align}
\\]

\n


g)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[21]}x({a[22]}x^2+{a[23]}x)+{a[24]}x^2+{a[25]}x^3}&=
\\simplify[!collectNumbers]{x^2({a[21]}{a[23]})+x^2{a[24]}+x^3({a[21]}{a[22]})+x^3{a[25]}}\\\\&=
\\simplify[!collectNumbers]{x^2({a[21]}{a[23]}+{a[24]})+x^3({a[21]}{a[22]}+{a[25]})}\\\\&=
\\simplify{x^2({a[21]}{a[23]}+{a[24]})+x^3({a[21]}{a[22]}+{a[25]})}\\text{.}
\\end{align}
\\]

\n

h)

\n

\\[
\\begin{align}
\\simplify[terms]{({a[26]}x^2+{a[27]}x^3)+{a[28]}x({a[29]}x^2+{a[30]}x)}&=
\\simplify[!collectNumbers]{x^2({a[26]})+x^2({a[28]}{a[30]})+x^3({a[28]}{a[29]})+x^3({a[27]})}\\\\&=
\\simplify[!collectNumbers]{x^2({a[26]}+{a[28]}{a[30]})+x^3({a[28]}{a[29]}+{a[27]})}\\\\&=
\\simplify{x^2({a[26]}+{a[28]}{a[30]})+x^3({a[28]}{a[29]}+{a[27]})}\\text{.}
\\end{align}
\\]

\n

i)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[31]}({a[32]}x+{a[33]}y)+{a[34]}x({a[42]}+{a[35]}y)}&=
\\simplify[!collectNumbers]{({a[31]}{a[32]})x+({a[34]}{a[42]})x+{a[31]}{a[33]}y+{a[34]}{a[35]}x*y}\\\\&=
\\simplify[!collectNumbers]{({a[31]}{a[32]}+{a[34]}{a[42]})x+{a[31]}{a[33]}y+{a[34]}{a[35]}x*y}\\\\&=
\\simplify{({a[31]}{a[32]}+{a[34]}{a[42]})x+{a[31]}{a[33]}y+{a[34]}{a[35]}x*y}\\text{.}
\\end{align}
\\]

\n

j)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[36]}a^2({a[37]}+{a[38]}b)+{a[39]}b^2({a[40]}a+{a[41]}b)}&=
\\simplify[!collectNumbers]{{a[37]}{a[36]}a^2+{a[38]}{a[36]}a^2b+{a[40]}{a[39]}a*b^2+{a[39]}{a[41]}b^3}\\\\&=
\\simplify{{a[37]}{a[36]}a^2+{a[38]}{a[36]}a^2b+{a[40]}{a[39]}a*b^2+{a[39]}{a[41]}b^3}\\text{.}
\\end{align}
\\]

", "rulesets": {"terms": ["all", "!collectNumbers", "!unitFactor", "!noLeadingMinus"]}, "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "repeat(random(-10..10 except [-1,0,1] ),50)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[1]}({a[2]}x+{a[3]})}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[1]*a[2]}x+{a[1]*a[3]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "x*(`+-$n) + `+-$n", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[4]}({a[5]}x+{a[6]})}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[4]*a[5]}x+{a[4]*a[6]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n*x + `+-$n", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[7]}({a[8]}x^2+{a[9]}y)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[7]*a[8]}x^2+{a[7]*a[9]}y", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n*x^2 + `+-$n*y", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[10]}({a[11]}x^2+{a[12]}y)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[10]*a[11]}x^2+{a[10]*a[12]}y", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n*x^2 + `+-$n*y", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[13]}x({a[14]}x^2+{a[15]}x+{a[16]})}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[13]*a[14]}x^3+{a[13]*a[15]}x^2+{a[13]*a[16]}x", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n*x^3 + `+-$n*x^2 + `+-$n*x", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[17]}x({a[18]}x^2+{a[19]}x+{a[20]})}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[17]*a[18]}x^3+{a[17]*a[19]}x^2+{a[17]*a[20]}x", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n`?*x^3 + `+-$n`?*x^2 + `+-$n`?*x", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[21]}x({a[22]}x^2+{a[23]}x)+{a[24]}x^2+{a[25]}x^3}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "x^2*{a[21]*a[23]+a[24]}+x^3*{a[21]*a[22]+a[25]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "x^2*`+-$n`? + x^3*`+-$n`?", "partialCredit": 0, "message": "It doesn't look like you've expanded - make sure you don't use any brackets in your answer.", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{({a[26]}x^2+{a[27]}x^3)+{a[28]}x({a[29]}x^2+{a[30]}x)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "x^2*{a[26]+a[28]*a[30]} + x^3*{a[28]*a[29]+a[27]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "x^2*`+-$n`? + x^3*`+-$n`?", "partialCredit": 0, "message": "It doesn't look like you've expanded - make sure you don't use any brackets in your answer.", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[31]}({a[32]}x+{a[33]}y)+{a[34]}x({a[42]}+{a[35]}y)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[31]*a[32]+a[34]*a[42]}x+{a[31]*a[33]}y+{a[34]*a[35]}x*y", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "x*(`+-$n) + y*(`+-$n) + x*y*(`+-$n)", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[36]}a^2({a[37]}+{a[38]}b)+{a[39]}b^2({a[40]}a+{a[41]}b)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[37]*a[36]}a^2+{a[38]*a[36]}a^2b+{a[40]*a[39]}a*b^2+{a[39]*a[41]}b^3", "answerSimplification": "basic", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n`?*a^2 + `+-$n`?*a^2*b + `+-$n`?*a*b^2 + `+-$n`?*b^3", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}, {"name": "b", "value": ""}]}], "sortAnswers": false}]}, {"name": "Create an algebraic expression from a word problem, simplify, and evaluate in dollars version", "extensions": ["stats"], "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": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}], "metadata": {"description": "

Given a description in words of the costs of some items in terms of an unknown cost, write down an expression for the total cost of a selection of items. Then simplify the expression, and finally evaluate it at a given point.

\n

The word problem is about the costs of sweets in a sweet shop.

", "licence": "Creative Commons Attribution 4.0 International"}, "variable_groups": [{"variables": ["a1", "b1", "c1"], "name": "Number of packets eaten"}], "tags": [], "variablesTest": {"condition": "gcd(a1,b1+c1/2)=1", "maxRuns": 100}, "ungrouped_variables": ["name", "total"], "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

We are told that the price of a packet of lollipops is represented by the letter $x$.

\n

A packet of toffee costs $£1$ more than a packet of lollipops, i.e. $x+1$.

\n

A packet of jelly sweets costs half as much as a packet of toffee, so $\\frac{1}{2}(x+1)$.

\n

b)

\n

To find the total cost, multiply the expressions above for the cost of each kind of sweet by the number of packets eaten, and add them together.

\n

Without simplifying, we obtain:

\n

\\begin{align}
\\text{Cost} &= \\simplify[]{{a1}x+{b1}(x+1) + {c1}*(1/2)*(x+1)} \\\\
&= \\simplify[]{{a1}x+{b1}(x+1) + {c1/2}*(x+1)}
\\text{.}
\\end{align}

\n

c)

\n

The first step in simplifying this expression is to expand both sets of brackets:

\n

\\begin{align}
\\simplify[]{ {a1}x + {b1}(x+1) + {c1/2}*(x+1)} &= \\simplify[]{ {a1}x + {b1}x + {b1}*1 + {c1/2}x + {c1/2}*1} \\\\
&= \\simplify[] { {a1}x + {b1}x + {b1} + {c1/2}x + {c1/2} } \\text{.}
\\end{align}

\n

Finally, collect like terms:

\n

\\begin{align}
\\simplify[] { {a1}x + {b1}x + {b1} + {c1/2}x + {c1/2} } &= \\simplify[]{ {a1+b1+c1/2}x + {b1+c1/2} } \\text{.}
\\end{align}

\n

\n

d)

\n

Once we know that the price of a packet of lollipops is $£2$, we can substitute this for $x$ in the equation above.

\n

\\begin{align}
\\text{Cost}&=\\simplify{ {a1+b1+c1/2}x+{b1+c1/2} }\\\\
&=\\var{a1+b1+c1/2} \\times 2+\\var{b1+c1/2} \\\\
&=\\var{(a1+b1+c1/2)*2+b1+c1/2} \\text{.}
\\end{align}

\n

So {name} spent $£\\var{total}$ on sweets last week.

", "statement": "

{name} eats a lot of sweets. You are trying to work out the cost of the sweets that {name} ate last week.

\n

{name} ate $\\var{a1}$ packets of lollipops, $\\var{b1}$ packets of toffee and $\\simplify{{c1}}$ packets of jelly sweets.

\n

You know that a packet of toffee costs $1 more than a packet of lollipops, and a packet of jelly sweets costs half as much as a packet of toffees.

", "parts": [{"scripts": {}, "unitTests": [], "marks": 0, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "gaps": [{"scripts": {}, "unitTests": [], "marks": 1, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "vsetRangePoints": 5, "checkingAccuracy": 0.001, "answer": "x", "type": "jme", "checkingType": "absdiff", "useCustomName": false, "failureRate": 1, "customName": "", "showFeedbackIcon": true, "checkVariableNames": false, "vsetRange": [0, 1], "showPreview": true, "showCorrectAnswer": true}, {"scripts": {}, "unitTests": [], "marks": 1, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "vsetRangePoints": 5, "checkingAccuracy": 0.001, "answer": "x+1", "type": "jme", "checkingType": "absdiff", "useCustomName": false, "failureRate": 1, "customName": "", "showFeedbackIcon": true, "checkVariableNames": false, "vsetRange": [0, 1], "showPreview": true, "showCorrectAnswer": true}, {"scripts": {}, "unitTests": [], "marks": 1, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "vsetRangePoints": 5, "checkingAccuracy": 0.001, "answer": "1/2(x+1)", "type": "jme", "checkingType": "absdiff", "useCustomName": false, "failureRate": 1, "customName": "", "showFeedbackIcon": true, "checkVariableNames": false, "vsetRange": [0, 1], "showPreview": true, "showCorrectAnswer": true}], "type": "gapfill", "useCustomName": false, "customName": "", "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

Let the cost of a packet of lollipops be $x.

\n

Write an expression in terms of $x$ for the cost of each kind of sweet:

\n

Lollipops: $[[0]]

\n

Toffees: $[[1]]

\n

Jelly sweets: $[[2]]

"}, {"scripts": {}, "unitTests": [], "marks": 0, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "gaps": [{"scripts": {}, "unitTests": [], "marks": 1, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "valuegenerators": [{"value": "", "name": "x"}], "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "checkingType": "absdiff", "useCustomName": false, "failureRate": 1, "showFeedbackIcon": true, "showPreview": true, "showCorrectAnswer": true, "answerSimplification": "all", "vsetRangePoints": 5, "type": "jme", "variableReplacements": [], "checkingAccuracy": 0.001, "answer": "({a1}+{b1}+{c1}/2)x+({b1}+{c1}/2)", "customName": "", "checkVariableNames": true}], "type": "gapfill", "useCustomName": false, "customName": "", "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

Write an algebraic expression for the overall cost of the sweets {name} ate, in terms of $x$.

\n

$[[0]]

"}, {"scripts": {}, "unitTests": [], "marks": 0, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "gaps": [{"scripts": {}, "unitTests": [], "marks": 1, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "valuegenerators": [{"value": "", "name": "x"}], "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "checkingType": "absdiff", "useCustomName": false, "failureRate": 1, "showFeedbackIcon": true, "mustmatchpattern": {"nameToCompare": "", "partialCredit": 0, "pattern": "$n*x + $n", "message": "Your answer is not fully simplified."}, "showPreview": true, "showCorrectAnswer": true, "answerSimplification": "all", "vsetRangePoints": 5, "type": "jme", "variableReplacements": [], "checkingAccuracy": 0.001, "answer": "({a1}+{b1}+{c1}/2)x+({b1}+{c1}/2)", "customName": "", "checkVariableNames": true}], "type": "gapfill", "useCustomName": false, "customName": "", "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

Now simplify your expression for the total cost.

\n

$[[0]]

"}, {"scripts": {}, "unitTests": [], "marks": 0, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "gaps": [{"scripts": {}, "unitTests": [], "marks": 1, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "valuegenerators": [], "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "checkingType": "absdiff", "useCustomName": false, "failureRate": 1, "showFeedbackIcon": true, "showPreview": true, "showCorrectAnswer": true, "answerSimplification": "all", "vsetRangePoints": 5, "type": "jme", "variableReplacements": [], "checkingAccuracy": 0.001, "answer": "({a1}+{b1}+{c1}/2)2+{b1}+{c1}/2", "customName": "", "notallowed": {"showStrings": true, "partialCredit": 0, "strings": ["(", ")"], "message": "

Don't use brackets

"}, "checkVariableNames": true}], "type": "gapfill", "useCustomName": false, "customName": "", "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

You find out that a packet of lollipops costs $2.

\n

Calculate {name}'s total expenditure on sweets last week.

\n

$[[0]]

"}], "rulesets": {}, "functions": {}, "variables": {"total": {"templateType": "anything", "definition": "(a1+b1+c1/2)*2 + b1+c1/2", "description": "

The total spent.

", "group": "Ungrouped variables", "name": "total"}, "c1": {"templateType": "anything", "definition": "random(2..5)*2", "description": "

Number of packets of jelly sweets eaten.

", "group": "Number of packets eaten", "name": "c1"}, "a1": {"templateType": "anything", "definition": "random(5..10)", "description": "

Number of packets of lollipops eaten

", "group": "Number of packets eaten", "name": "a1"}, "b1": {"templateType": "anything", "definition": "random(2..10 except a1)", "description": "

Number of packets of toffee eaten

", "group": "Number of packets eaten", "name": "b1"}, "name": {"templateType": "anything", "definition": "random('Jerry','Jessica')", "description": "", "group": "Ungrouped variables", "name": "name"}}, "type": "question"}, {"name": "Converting from standard index form to decimal.", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "rulesets": {}, "functions": {}, "ungrouped_variables": ["A", "ran"], "metadata": {"description": "

Given some numbers in standard index form, convert to decimal form.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "variable_groups": [], "advice": "

When given a number in the form $A \\times 10^n$, we can think of $n$ as a number telling us how many places to move the decimal point.

\n

When $n$ is positive, we move the decimal point to the right side, for example:

\n

\\[ 1.5 \\times 10^3 = 1500.0 \\text{ .} \\]

\n

When $n$ is negative, we move the decimal point to the left side, for example:

\n

\\[ 1.5 \\times 10^{-3} = 0.0015 \\text{ .} \\]

\n

When $n = 0$, we do not move the decimal point:

\n

\\[ 1.5 \\times 10^0 = 1.5 \\text{ .}\\]

\n

 

\n

a)

\n

In $\\var{A[0]} \\times 10^\\var{ran}$, $n = \\var{ran}$ and so we move the decimal point {ran} places to the right.

\n

\\[\\var{A[0]}  ⇒  \\var{precround((A[0] * 10^ran), 0)}\\]

\n

\n

b)

\n

In $\\var{A[1]} \\times 10^\\var{-ran + 4}$, $n = \\var{-ran +4}$ and so we move the decimal point {ran -4} places to the left.

\n

\\[\\var{A[1]}  ⇒  \\var{A[1]*10^(-ran+4)}\\]

", "statement": "

Write the following in decimal form.

", "preamble": {"js": "", "css": ""}, "variables": {"A": {"templateType": "anything", "description": "", "name": "A", "group": "Ungrouped variables", "definition": "repeat(random(1..10 #0.01 except 10), 2)"}, "ran": {"templateType": "anything", "description": "", "name": "ran", "group": "Ungrouped variables", "definition": "random([6,7,8,9,10])"}}, "parts": [{"variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "gapfill", "sortAnswers": false, "prompt": "

$\\var{A[0]} \\times 10^\\var{ran} =$  [[0]]

", "customName": "", "gaps": [{"answer": "{precround(({A[0]}*10^{ran}),0)}", "failureRate": 1, "extendBaseMarkingAlgorithm": true, "checkingAccuracy": "0", "valuegenerators": [], "variableReplacements": [], "unitTests": [], "customName": "", "checkingType": "dp", "vsetRange": [0, 1], "showFeedbackIcon": true, "checkVariableNames": false, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "type": "jme", "showPreview": true, "vsetRangePoints": 5, "useCustomName": false, "notallowed": {"message": "", "showStrings": false, "partialCredit": 0, "strings": ["*10^"]}, "showCorrectAnswer": true, "marks": "0.5", "scripts": {}}], "useCustomName": false, "variableReplacements": [], "unitTests": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 0, "scripts": {}}, {"variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "gapfill", "sortAnswers": false, "prompt": "

$\\var{A[1]} \\times 10^\\var{-ran + 4} =$  [[0]]

\n

", "customName": "", "gaps": [{"answer": "{A[1]*10^(-ran+4)}", "failureRate": 1, "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "valuegenerators": [], "variableReplacements": [], "unitTests": [], "customName": "", "checkingType": "absdiff", "vsetRange": [0, 1], "checkVariableNames": false, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "type": "jme", "mustmatchpattern": {"message": "", "nameToCompare": "", "partialCredit": 0, "pattern": "$n"}, "showPreview": true, "vsetRangePoints": 5, "useCustomName": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": "0.5", "scripts": {}}], "useCustomName": false, "variableReplacements": [], "unitTests": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 0, "scripts": {}}], "tags": ["conversion", "converting", "standard form", "standard index form", "taxonomy"], "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Find the zeros of the given quadratic function.", "extensions": ["geogebra"], "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/"}], "preamble": {"js": "", "css": ""}, "functions": {}, "advice": "

Look for the points where the function crosses the x-axis.

", "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "ungrouped_variables": ["a", "x1", "x2", "defs"], "metadata": {"licence": "None specified", "description": "

Students will analyze a graph of a quadratic function to identify the x-intercepts (or Roots, or Zeros).

"}, "parts": [{"showPreview": true, "vsetRangePoints": 5, "failureRate": 1, "unitTests": [], "checkVariableNames": false, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "type": "jme", "prompt": "

The zeros or roots are (express your answer as e.g. set(-2,5).

", "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "checkingType": "absdiff", "checkingAccuracy": 0.001, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "set({x1},{x2})", "expectedVariableNames": [], "marks": 1}], "tags": [], "variable_groups": [], "variables": {"defs": {"definition": "[\n ['a',a],\n ['x1',x1],\n ['x2',x2]\n]", "group": "Ungrouped variables", "templateType": "anything", "name": "defs", "description": "

used to send the parameters to the geogebra applet

"}, "x1": {"definition": "random(-10..10)", "group": "Ungrouped variables", "templateType": "anything", "name": "x1", "description": "

x1 is the first root of the function

"}, "a": {"definition": "random(-1..1#0.1)", "group": "Ungrouped variables", "templateType": "anything", "name": "a", "description": "

The leading coefficient

"}, "x2": {"definition": "random(-10..10)", "group": "Ungrouped variables", "templateType": "anything", "name": "x2", "description": "

x2 is the second root of the function

"}}, "statement": "

What are the zeros of the quadratic function graphed below?

\n

{geogebra_applet('https://www.geogebra.org/m/mgj5whns', defs)}

\n

", "type": "question"}, {"name": "Percentage increase/decrease", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Dann Mallet", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/800/"}], "statement": "

In this question, we will look at calculating percentage increases and decreases. We start off with some purely numerical examples before moving onto some applied situations.

", "preamble": {"css": "", "js": ""}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"description": "

A small sequence of questions on calculating percentage increases and decreases. Moving from percentages of 100, to percentages of some random whole number, and onto calculating percentage changes in applied financial situations.

", "licence": "All rights reserved"}, "functions": {}, "rulesets": {}, "parts": [{"extendBaseMarkingAlgorithm": true, "prompt": "

Increasing the quantity 100 by {incperc}% gives [[0]]

\n

Decreasing the quantity 100 by {decperc}% gives [[1]]

", "type": "gapfill", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "showCorrectAnswer": true, "gaps": [{"extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "precisionPartialCredit": 0, "showPrecisionHint": true, "correctAnswerStyle": "plain", "allowFractions": false, "unitTests": [], "marks": 1, "showFeedbackIcon": true, "precision": "2", "type": "numberentry", "variableReplacements": [], "minValue": "100*(1+{incperc}/100)", "precisionType": "dp", "showCorrectAnswer": true, "strictPrecision": false, "customMarkingAlgorithm": "", "precisionMessage": "You have not given your answer to the correct precision.", "maxValue": "100*(1+{incperc}/100)", "scripts": {}, "mustBeReducedPC": 0, "correctAnswerFraction": false}, {"extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "precisionPartialCredit": 0, "showPrecisionHint": true, "correctAnswerStyle": "plain", "allowFractions": false, "unitTests": [], "marks": 1, "showFeedbackIcon": true, "precision": "2", "type": "numberentry", "variableReplacements": [], "minValue": "100*(1-{decperc}/100)", "precisionType": "dp", "showCorrectAnswer": true, "strictPrecision": false, "customMarkingAlgorithm": "", "precisionMessage": "You have not given your answer to the correct precision.", "maxValue": "100*(1-{decperc}/100)", "scripts": {}, "mustBeReducedPC": 0, "correctAnswerFraction": false}], "customMarkingAlgorithm": "", "unitTests": [], "marks": 0, "showFeedbackIcon": true}, {"extendBaseMarkingAlgorithm": true, "prompt": "

Increasing the quantity {numtochange} by {incperc}% gives [[0]]

\n

Decreasing the quantity {numtochange} by {decperc}% gives [[1]]

", "type": "gapfill", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "showCorrectAnswer": true, "gaps": [{"extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "precisionPartialCredit": 0, "showPrecisionHint": true, "correctAnswerStyle": "plain", "allowFractions": false, "unitTests": [], "marks": 1, "showFeedbackIcon": true, "precision": "2", "type": "numberentry", "variableReplacements": [], "minValue": "{numtochange}*(1+{incperc}/100)", "precisionType": "dp", "showCorrectAnswer": true, "strictPrecision": false, "customMarkingAlgorithm": "", "precisionMessage": "You have not given your answer to the correct precision.", "maxValue": "{numtochange}*(1+{incperc}/100)", "scripts": {}, "mustBeReducedPC": 0, "correctAnswerFraction": false}, {"extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "precisionPartialCredit": 0, "showPrecisionHint": true, "correctAnswerStyle": "plain", "allowFractions": false, "unitTests": [], "marks": 1, "showFeedbackIcon": true, "precision": "2", "type": "numberentry", "variableReplacements": [], "minValue": "{numtochange}*(1-{decperc}/100)", "precisionType": "dp", "showCorrectAnswer": true, "strictPrecision": false, "customMarkingAlgorithm": "", "precisionMessage": "You have not given your answer to the correct precision.", "maxValue": "{numtochange}*(1-{decperc}/100)", "scripts": {}, "mustBeReducedPC": 0, "correctAnswerFraction": false}], "customMarkingAlgorithm": "", "unitTests": [], "marks": 0, "showFeedbackIcon": true}, {"extendBaseMarkingAlgorithm": true, "prompt": "

A product is not selling well at its current price of \\${price}, so the manager decides to mark down the price by {markdown}%. The mark down amounts to [[0]]

\n

The resulting sale price will then be [[1]]

", "type": "gapfill", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "showCorrectAnswer": true, "gaps": [{"extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "precisionPartialCredit": 0, "showPrecisionHint": true, "correctAnswerStyle": "plain", "allowFractions": false, "unitTests": [], "marks": 1, "showFeedbackIcon": true, "precision": "2", "type": "numberentry", "variableReplacements": [], "minValue": "{markdown}/100*{price}", "precisionType": "dp", "showCorrectAnswer": true, "strictPrecision": false, "customMarkingAlgorithm": "", "precisionMessage": "You have not given your answer to the correct precision.", "maxValue": "{markdown}/100*{price}", "scripts": {}, "mustBeReducedPC": 0, "correctAnswerFraction": false}, {"extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "precisionPartialCredit": 0, "showPrecisionHint": true, "correctAnswerStyle": "plain", "allowFractions": false, "unitTests": [], "marks": 1, "showFeedbackIcon": true, "precision": "2", "type": "numberentry", "variableReplacements": [], "minValue": "{price}*(1-{markdown}/100)", "precisionType": "dp", "showCorrectAnswer": true, "strictPrecision": false, "customMarkingAlgorithm": "", "precisionMessage": "You have not given your answer to the correct precision.", "maxValue": "{price}*(1-{markdown}/100)", "scripts": {}, "mustBeReducedPC": 0, "correctAnswerFraction": false}], "customMarkingAlgorithm": "", "unitTests": [], "marks": 0, "showFeedbackIcon": true}, {"extendBaseMarkingAlgorithm": true, "prompt": "

Australia has a 10% goods and services tax. Generally, the price that you see marked on a product or in a menu includes the tax. If the price of a meal at Euler's Eatery comes to \\${mealcost}, then the amount of tax included in the price is [[0]]

", "type": "gapfill", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "showCorrectAnswer": true, "gaps": [{"extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "precisionPartialCredit": 0, "showPrecisionHint": true, "correctAnswerStyle": "plain", "allowFractions": false, "unitTests": [], "marks": 1, "showFeedbackIcon": true, "precision": "2", "type": "numberentry", "variableReplacements": [], "minValue": "{mealcost}*10/110", "precisionType": "dp", "showCorrectAnswer": true, "strictPrecision": false, "customMarkingAlgorithm": "", "precisionMessage": "You have not given your answer to the correct precision.", "maxValue": "{mealcost}*10/110", "scripts": {}, "mustBeReducedPC": 0, "correctAnswerFraction": false}], "customMarkingAlgorithm": "", "unitTests": [], "marks": 0, "showFeedbackIcon": true}], "advice": "

Part a)

\n

To increase the quantity 100 by {incperc}%, we first need to find what {incperc}% of 100 is, then we add that value to 100. To find {incperc}% of 100, we multiply 100 by the decimal form of {incperc}. That is

\n

\\[100\\times \\var{incperc}/100\\]

\n

Then we add this to 100, giving

\n

\\[100+100\\times \\var{incperc}/100=\\var{incpercans}.\\]

\n

To decrease the quantity 100 by {decperc}%, we first need to find what {decperc}% of 100 is, then we subtract that value from 100. To find {decperc}% of 100, we multiply 100 by the decimal form of {decperc}. That is

\n

\\[100\\times \\var{decperc}/100\\]

\n

Then we subtract this from 100, giving

\n

\\[100-100\\times \\var{decperc}/100=\\var{decpercans}.\\]

\n

\n

Part b)

\n

Similarly to part a), we need to find {incperc}% and {decperc}% of {numtochange}, then add/subtract appropriately. We have

\n

\\[\\var{numtochange}+\\var{numtochange}\\times \\var{incperc}/100=\\var{incpercrandans}.\\]

\n

\\[\\var{numtochange}-\\var{numtochange}\\times \\var{decperc}/100=\\var{decpercrandans}.\\]

\n

\n

Part c)

\n

To find the markdown, we are finding the percentage {markdown}% of the original price. So we multiply {price} by the decimal form of {markdown}%. That is

\n

\\[\\var{price}\\times \\var{markdown}/100=\\var{amtmarkdown}.\\]

\n

The resulting sale price is the original price, minus this markdown amount. This is the same as the percentage decrease problems in part a) and b).

\n

\\[\\var{price}-\\var{price}\\times \\var{markdown}/100=\\var{markdownprice}.\\]

\n

\n

Part d)

\n

In this problem, the meal price (which includes the tax) could be thought of as 110% of the tax-free meal price. So to find the tax (which is 10% of the tax-free meal price), one way is to find 1% of the full price and then multiply by 10. This is kind of like the unit cost method in a way. So we have

\n

\\[\\frac{\\var{mealcost}}{110}\\times 10=\\var{mealtax}.\\]

", "tags": [], "ungrouped_variables": ["incperc", "decperc", "numtochange", "price", "markdown", "mealcost", "incpercans", "decpercans", "incpercrandans", "decpercrandans", "markdownprice", "mealtax", "amtmarkdown"], "variables": {"decperc": {"definition": "random(1..15#1)", "name": "decperc", "description": "

Decrease percentage

", "group": "Ungrouped variables", "templateType": "randrange"}, "markdown": {"definition": "random(10..25#1)", "name": "markdown", "description": "", "group": "Ungrouped variables", "templateType": "randrange"}, "price": {"definition": "random(100..250#1)", "name": "price", "description": "", "group": "Ungrouped variables", "templateType": "randrange"}, "incpercans": {"definition": "100*(1+{incperc}/100)", "name": "incpercans", "description": "

Answer to the increase percentage question

", "group": "Ungrouped variables", "templateType": "anything"}, "decpercans": {"definition": "100*(1-{decperc}/100)", "name": "decpercans", "description": "

Answer to the decrease percentage question

", "group": "Ungrouped variables", "templateType": "anything"}, "incpercrandans": {"definition": "{numtochange}*(1+{incperc}/100)", "name": "incpercrandans", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "decpercrandans": {"definition": "{numtochange}*(1-{decperc}/100)", "name": "decpercrandans", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "amtmarkdown": {"definition": "{markdown}/100*{price}", "name": "amtmarkdown", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "incperc": {"definition": "random(1..15#1)", "name": "incperc", "description": "

Increase percentage

", "group": "Ungrouped variables", "templateType": "randrange"}, "markdownprice": {"definition": "{price}-{markdown}/100*{price}", "name": "markdownprice", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "mealtax": {"definition": "precround({mealcost}/110*10,2)", "name": "mealtax", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "mealcost": {"definition": "random(15..35#0.01)", "name": "mealcost", "description": "", "group": "Ungrouped variables", "templateType": "randrange"}, "numtochange": {"definition": "random(2..99#1)", "name": "numtochange", "description": "

The value to be changed by some percentage

", "group": "Ungrouped variables", "templateType": "randrange"}}, "type": "question"}, {"name": "factorise a quadratic", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Laure Helme-Guizon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2531/"}], "variable_groups": [], "rulesets": {}, "preamble": {"js": "", "css": ""}, "statement": "

Consider the quadratic $ \\simplify[all,expandBrackets]{({a}*x + {b})*(x+{c})}$.

", "parts": [{"type": "gapfill", "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "useCustomName": false, "showFeedbackIcon": true, "unitTests": [], "marks": 0, "gaps": [{"variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "valuegenerators": [{"name": "x", "value": ""}], "customName": "", "unitTests": [], "vsetRange": [0, 1], "notallowed": {"strings": ["/"], "showStrings": true, "partialCredit": 0, "message": ""}, "vsetRangePoints": 5, "showPreview": true, "showCorrectAnswer": true, "scripts": {"mark": {"script": "\nvar variables = this.question.scope.variables;\nvar unwrap = Numbas.jme.unwrapValue;\n\nvar a = unwrap(variables.a);\nvar b = unwrap(variables.b);\nvar c = unwrap(variables.c);\n\ntry {\n // get the student's answers to the two gaps\n var gap0 = this.parentPart.gaps[0].studentAnswer;\n \n if (!gap0) {\n return; \n }\n \n // there are two roots: -b/a and -c. Make sure there is exactly one root in gap0\n \n var root0 = -1*b/a;\n var root1 = -1*c;\n var correctanswer = a + \"*x*x + (\" +(b+c*a) + \")*x\" + b*c;\n var gap0root0 = (\"0\" == unwrap(this.question.scope.evaluate(gap0,{\"x\": root0})));\n var gap0root1 = (\"0\" == unwrap(this.question.scope.evaluate(gap0,{\"x\": root1})));\n \n // check that gap0 is linear by verifying that it increases by\n // the same constant amount from 10 to 11 and 11 to 12.\n var e10 = unwrap(this.question.scope.evaluate(gap0,{\"x\": 10}));\n var e11 = unwrap(this.question.scope.evaluate(gap0,{\"x\": 11}));\n var e12 = unwrap(this.question.scope.evaluate(gap0,{\"x\": 12}));\n if ((e11 == e12) || (e11 - e10 !== e12 - e11)) {\n this.setCredit(0, \"$\" + gap0 + \"$ is not linear. A linear factor is of the form $Ax + B$ for constants $A \\\\neq 0$ and $B$.\");\n } else if ((gap0root0 && !gap0root1) || (!gap0root0 && gap0root1)) {\n // if root0 xor root1 is a root of gap0\n this.setCredit(1, \"$\" + gap0 + \"$ is a linear factor of $\\\\simplify{\" + correctanswer + \"}$.\");\n } else {\n this.setCredit(0, \"$\" + gap0 + \"$ is not a linear factor of $\\\\simplify{\" + correctanswer + \"}$.\" );\n }\n \n \n} catch(e) {\n this.setCredit(0); // if the student's answer isn't a valid expression, give 0 credit\n this.markingComment(e);\n alert(e);\n}", "order": "instead"}}, "useCustomName": false, "failureRate": 1, "type": "jme", "checkVariableNames": false, "checkingType": "absdiff", "showFeedbackIcon": true, "marks": 1, "variableReplacements": [], "adaptiveMarkingPenalty": 0, "checkingAccuracy": 0.001, "answer": "({a}*x + {b})", "extendBaseMarkingAlgorithm": true}, {"variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "valuegenerators": [{"name": "x", "value": ""}], "customName": "", "unitTests": [], "vsetRange": [0, 1], "notallowed": {"strings": ["/"], "showStrings": false, "partialCredit": 0, "message": ""}, "vsetRangePoints": 5, "showPreview": true, "showCorrectAnswer": true, "scripts": {"mark": {"script": "\nvar variables = this.question.scope.variables;\nvar unwrap = Numbas.jme.unwrapValue;\n\nvar a = unwrap(variables.a);\nvar b = unwrap(variables.b);\nvar c = unwrap(variables.c);\n\ntry {\n // get the student's answers to the two gaps\n var gap0 = this.parentPart.gaps[0].studentAnswer;\n var gap1 = this.parentPart.gaps[1].studentAnswer;\n \n if (!gap0 || !gap1) {\n return; \n }\n // check that gap1 is linear\n var e10 = unwrap(this.question.scope.evaluate(gap1,{\"x\": 10}));\n var e11 = unwrap(this.question.scope.evaluate(gap1,{\"x\": 11}));\n var e12 = unwrap(this.question.scope.evaluate(gap1,{\"x\": 12}));\n if ((e11 == e12) || (e11 - e10 !== e12 - e11)) {\n this.setCredit(0, \"$\" + gap1 + \"$ is not linear. A linear factor is of the form $Ax + B$ for constants $A \\\\neq 0$ and $B$.\");\n return;\n } \n \n var compare_settings = {};\n compare_settings.checkingType = \"absdiff\";\n compare_settings.vsetRangeStart = -5; //The lower bound of the range to pick variable values from.\n compare_settings.vsetRangeEnd = 5; //The upper bound of the range to pick variable values from.\n compare_settings.vsetRangePoints = 5; //The number of values to pick for each variable.\n compare_settings.checkingAccuracy = 0.1; // A parameter for the checking function to determine if two results are equal. See {@link Numbas.jme.checkingFunctions}.\n compare_settings.failureRate = 1;\n \n var studentanswer = \"(\" + gap0 + \")*(\" + gap1 + \")\";\n var correctanswer = a + \"*x*x + (\" +(b+c*a) + \")*x\" + b*c;\n \n for (var n = 0; n < 10; n++)\n {\n var x = Math.floor(10*Math.random());\n var test1 = unwrap(this.question.scope.evaluate(studentanswer,{\"x\": x}));\n var test2 = unwrap(this.question.scope.evaluate(correctanswer,{\"x\": x}));\n if (test1 != test2) {\n // student answer does not evaluate to the same thing as the correct answer\n this.setCredit(0,\"The product of the factors should be $\\\\simplify{\" + correctanswer + \"}$, but the product of your factors is $\\\\simplify[expandBrackets,all]{\" + studentanswer + \"}$.\");\n return;\n }\n }\n // student answer passed random testing. It is highly likely to be correct.\n this.setCredit(1,\"The product of your factors is $\\\\simplify{\" + correctanswer + \"}$.\");\n \n} catch(e) {\n this.setCredit(0); // if the student's answer isn't a valid expression, give 0 credit\n this.markingComment(e);\n alert(e);\n}", "order": "instead"}}, "useCustomName": false, "failureRate": 1, "type": "jme", "checkVariableNames": false, "checkingType": "absdiff", "showFeedbackIcon": true, "marks": 1, "variableReplacements": [], "adaptiveMarkingPenalty": 0, "checkingAccuracy": 0.001, "answer": "(x + {c})", "extendBaseMarkingAlgorithm": true}], "variableReplacements": [], "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "scripts": {}, "customName": "", "prompt": "

What are the the two linear factors of this quadratic?

\n

[[0]] and [[1]].

", "extendBaseMarkingAlgorithm": true, "sortAnswers": false}], "ungrouped_variables": ["a", "b", "c"], "advice": "

You can use the quadratic formula to deduce that $\\simplify[all,expandBrackets]{({a}*x + {b})*(x+{c})}$ has roots:

\n

$ x = \\frac{\\simplify{-({a}*{c}+{b})}\\pm\\sqrt{ (\\var{a*c+b})^2 - 4\\times(\\var{a})\\times(\\var{b*c}) }}{2\\times \\var{a}} = \\var{-1*c} \\text{ or } \\displaystyle \\simplify{-1*{b}/{a}}.$

\n

The roots determine the factors, but only upto a constant. In general, a quadratic with roots $ \\var{-1*c}$ and $\\simplify{-1*{b}/{a}}$ has the form:

\n

$C \\times (x + \\simplify{{b}/{a}}) \\times (x - \\var{-1*c})$

\n

for some constant term $C$. The only thing left to do is determine the value of the constant which makes:

\n

$C \\times (x + \\simplify{{b}/{a}}) \\times (x - \\var{-1*c}) = \\simplify[all,expandBrackets]{({a}*x + {b})*(x+{c})}$.

\n

Equating the coefficients of the $x^2$ terms in the left and right hand sides shows that $C=\\var{a}$. So

\n

$ (\\var{a}x + \\var{b}) \\times (x-\\var{-1*c}) = \\simplify[all,expandBrackets]{({a}*x + {b})*(x+{c})}$.

", "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-5..-1)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "

a

", "templateType": "anything"}}, "metadata": {"description": "

Quadratic factorisation that does not rely upon pattern matching.

", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}}, {"name": "Find the equation of a line through two points - zero gradient", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Vicky Hall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/659/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}], "rulesets": {}, "functions": {"correctPoints": {"parameters": [], "language": "javascript", "type": "html", "definition": "//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[math.min(xa-3,-2),math.max(ya+3,2),math.max(xb+3,2),math.min(yb-4,-2)],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n\nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-22,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: true, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\n\n\nquestion.signals.on('HTMLAttached',function(e) {\nko.computed(function(){\n//define ans as this \ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;"}, "plotPoints": {"parameters": [], "language": "javascript", "type": "html", "definition": "\n//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[math.min(xa-3,-2),math.max(ya+3,2),math.max(xb+3,2),math.min(yb-4,-2)],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n var ans;\n var nscope = new Numbas.jme.Scope([scope,{variables:{x:new Numbas.jme.types.TNum(0)}}]);\n//this is the beating heart of whatever plots the function,\n//I've changed this from being curve to functiongraph\n var line = board.create('functiongraph',[function(x){\nif(ans) {\n try {\nnscope.variables.x.value = x;\n var val = Numbas.jme.evaluate(ans,nscope).value;\n return val;\n }\n catch(e) {\nreturn 13;\n }\n}\nelse\n return 13;\n },-12,12]\n , {strokeColor:\"blue\",strokeWidth: 4} );\n \nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-22,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: false, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\nquestion.lines = {\n l:line, c:correct_line\n}\n\n question.signals.on('HTMLAttached',function(e) {\nko.computed(function(){\nvar expr = question.parts[2].gaps[0].display.studentAnswer();\n\n//define ans as this \ntry {\n ans = Numbas.jme.compile(expr,scope);\n}\ncatch(e) {\n ans = null;\n}\nline.updateCurve();\ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;"}}, "ungrouped_variables": ["xa", "yb", "ya", "xb", "m", "c"], "metadata": {"description": "

Use two points on a line graph to calculate the gradient and $y$-intercept and hence the equation of the straight line running through both points.

\n

The answer box for the third part plots the function, which allows the student to check their answer against the graph before submitting.

\n

This particular example has a 0 gradient.

", "licence": "Creative Commons Attribution 4.0 International"}, "variable_groups": [], "advice": "

a)

\n

The gradient is the ratio of vertical change ($y_2-y_1$) to horizontal change ($x_2-x_1$).
Since $y_2-y_1=0$, the gradient is $0$.

\n

b)

\n

Rearranging the equation $y=mx+c$ and using the coordinates of point A:

\n

\\begin{align}
c &= y_1-mx_1 \\\\
&= \\var{ya}-0 \\\\
&=\\var{ya}\\text{.}
\\end{align}

\n

\n

c)

\n

Substituting these values for $m$ and $c$ into $y=mx+c$,

\n

\\[ y=mx+c = \\simplify[!zeroTerm]{0+{c}} = \\var{c}\\text{.} \\]

\n

{correctPoints()}

\n

", "statement": "

Find the equation of the straight line through the points  $A=(\\var{xa},\\var{ya})$ and  $B=(\\var{xb},\\var{yb})$ in the form $y = mx + c$.

\n

{plotPoints()}

", "preamble": {"js": "", "css": ""}, "tags": ["0 gradient", "gradient", "graphs", "line equation", "Straight Line", "straight line", "taxonomy", "y-intercept"], "parts": [{"variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "type": "gapfill", "sortAnswers": false, "prompt": "

What is the gradient, $m$, of the line between these two points.

\n

 $ m=$ [[0]]

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

Calculate the $y$-intercept, $c$.

\n

$c=$ [[0]]

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

Combine the above results to find the straight line equation of the line running through these points in the form $y=mx+c$.

\n

$\\displaystyle y=$ [[0]]

", "customName": "", "gaps": [{"failureRate": 1, "answer": "{m}*x+{c}", "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "valuegenerators": [{"name": "x", "value": ""}], "variableReplacements": [], "unitTests": [], "customName": "", "checkingType": "absdiff", "vsetRange": [0, 1], "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "type": "jme", "showPreview": true, "vsetRangePoints": 5, "useCustomName": false, "showCorrectAnswer": true, "notallowed": {"message": "

You must input your answer in the form y = mx +c where m and c are numbers.

", "strings": ["c", "m"], "partialCredit": 0, "showStrings": false}, "checkVariableNames": true, "marks": 1, "scripts": {}}], "useCustomName": false, "showCorrectAnswer": true, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": "", "marks": 0, "scripts": {"mark": {"script": "console.log(this.question.lines.c)\nthis.question.lines.l.setAttribute({strokeColor: this.credit==1 ? 'green' : 'red'});\nthis.question.lines.c.setAttribute({visible: this.credit==1 ? false : true});\n", "order": "after"}}}], "variables": {"yb": {"name": "yb", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "ya"}, "c": {"name": "c", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "ya-m*xa"}, "m": {"name": "m", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "(ya-yb)/(xa-xb)"}, "xb": {"name": "xb", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "xa+random([2,4,6])"}, "ya": {"name": "ya", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..2 except 0)"}, "xa": {"name": "xa", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)"}}, "variablesTest": {"maxRuns": 100, "condition": "\n"}}, {"name": "Algebra IV: Properties of indices (1) - Multiplication/Division", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Sarah Turner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/881/"}], "functions": {}, "ungrouped_variables": ["a", "b", "c", "d", "f", "g", "h", "j"], "tags": [], "preamble": {"css": "fraction {\n display: inline-block;\n vertical-align: middle;\n}\nfraction > numerator, fraction > denominator {\n float: left;\n width: 100%;\n text-align: center;\n line-height: 2.5em;\n}\nfraction > numerator {\n border-bottom: 1px solid;\n padding-bottom: 5px;\n}\nfraction > denominator {\n padding-top: 5px;\n}\nfraction input {\n line-height: 1em;\n}\n\nfraction .part {\n margin: 0;\n}\n\n.table-responsive, .fractiontable {\n display:inline-block;\n}\n.fractiontable {\n padding: 0; \n border: 0;\n}\n\n.fractiontable .tddenom \n{\n text-align: center;\n}\n\n.fractiontable .tdnum \n{\n border-bottom: 1px solid black; \n text-align: center;\n}\n\n\n.fractiontable tr {\n height: 3em;\n}", "js": "document.createElement('fraction');\ndocument.createElement('numerator');\ndocument.createElement('denominator');"}, "advice": "

Recall the laws of indices to help solve the problems:

\n

$x^a \\times x^b = x^{a+b}$

\n

$x^a \\div x^b = x^{a-b}$

\n

$x^{-a} = \\frac{1}{x^a}$

\n

$(x^a)^b = x^{ab}$

\n

$(\\frac{x}{y})^a = \\frac{x^a}{y^a}$

\n

$x^\\frac{a}{b} = (\\sqrt[b]{x})^{a}$

\n

$x^0 = 1$

\n

\n

Worked Solutions:

\n

Part a)               $x^{(\\var{a}+\\var{b})}=\\simplify{x^{({a}+{b})}}$

\n

Part b)               $p^{(\\var{c}+\\var{d})}=\\simplify{p^{({c}+{d})}}$

\n

Part c)               $\\var{a}^\\var{f}\\times{k^{(\\var{b}\\times\\var{f})}}=\\simplify{{a}^{f}*k^{({b}*{f})}}$

\n

Part d)               $y^{((\\var{a}+\\var{b})/(\\var{a}\\times\\var{b}))}=y^{\\frac{\\simplify{{a}+{b}}}{\\simplify{{a}*{b}}}}$

\n

Part e)               $c^{(\\var{a}-\\var{b})}=c^\\simplify{({a}-{b})}$

\n

Part f)                $\\frac{\\var{a}}{\\var{b}}h^{\\var{c}-\\var{d}}=\\frac{\\var{a}}{\\var{b}}{\\simplify{h^{{c}-{d}}}}$

\n

Part g)               $\\frac{4^\\var{g}}{2^\\var{h}}\\times{d^{\\var{g}-\\var{h}}}=\\simplify{(4^{g})/(2^{h})*d^{g-h}}$

\n

Part h)               $\\frac{6^\\var{g}}{9^\\var{h}}\\times{p^{\\var{h}\\var{j}-\\var{g}\\var{f}}}=\\simplify{(6^{g})/(9^{h})*p^{h*j-g*f}}$

", "rulesets": {}, "parts": [{"stepsPenalty": 0, "vsetrangepoints": 5, "prompt": "

$x^\\var{a} \\times x^\\var{b}$

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "

Use the following indices law to help answer this question:

\n

$x^a \\times x^b = x^{a+b}$

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "showCorrectAnswer": true, "scripts": {}, "answer": "x^({a}+{b})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"stepsPenalty": 0, "vsetrangepoints": 5, "prompt": "

$p^\\var{c} \\times p^\\var{d}$

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "

Use the following law to help answer this question:

\n

$x^a \\times x^b = x^{a+b}$

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "p^({c}+{d})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"stepsPenalty": 0, "vsetrangepoints": 5, "prompt": "

$(\\var{a}k^\\var{b})^\\var{f}$

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "

Use the following law to answer this question:

\n

$(ax^b)^c = a^cx^{bc}$

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{a}^{f}*k^({b}*{f})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"stepsPenalty": 0, "vsetrangepoints": 5, "prompt": "

$y^{1/\\var{a}} \\times y^{1/\\var{b}}$

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "

Use the following law:

\n

$x^a \\times x^b = x^{a+b}$

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "y^(({a}+{b})/({a}*{b}))", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"stepsPenalty": 0, "vsetrangepoints": 5, "prompt": "

$c^\\var{a}$$c^\\var{b}$

\n

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "

Use the following law:

\n

$x^a \\div x^b = x^{a-b}$

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "c^({a}-{b})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"stepsPenalty": 0, "vsetrangepoints": 5, "prompt": "

$\\var{a}h^\\var{c}$$\\var{b}h^\\var{d}$

\n

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "

Use the following law to answer this question:

\n

$\\frac{ax^c}{bx^d}= \\frac{a}{b}x^{(c-d)}$

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{a}/{b}*h^({c}-{d})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"stepsPenalty": 0, "vsetrangepoints": 5, "prompt": "

$(4d)^\\var{g}$$(2d)^\\var{h}$

\n

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "

This question differs from part f due to the brackets. Using principles of BODMAS, the brackets need to be expanded first. 

\n

$(4d)^\\var{g}$ expands to $4^\\var{g}d^\\var{g}$ and $(2d)^\\var{h}$ expands to $2^\\var{h}d^\\var{h}$

\n

Now you are left with a simple division question as follows:

\n

$\\frac{4^{\\var{g}}d^{\\var{g}}}{2^{\\var{h}}d^{\\var{h}}}$

\n

\n

Use the principle:

\n

$\\frac{ax^c}{bx^d}= \\frac{a}{b}x^{(c-d)}$ to answer the question.

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "(4^{g})/(2^{h})*d^{g-h}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"stepsPenalty": 0, "vsetrangepoints": 5, "prompt": "

$(6p^{-\\var{f}})^{\\var{g}}$$(9p^{-\\var{j}})^{\\var{h}}$

\n

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "

Using principles of BODMAS, the brackets need to be expanded first. 

\n

$(6p^{-\\var{f}})^{\\var{g}}$ expands to $6^{\\var{g}}p^{({-\\var{f}}\\times{\\var{g}})}$ and $(9p^{-\\var{j}})^{\\var{h}}$ expands to $9^{\\var{h}}p^{({-\\var{j}}\\times{\\var{h}})}$

\n

Now you are left with a dividend and divisor,

\n

$\\frac{6^{\\var{g}}p^{({-\\var{f}}\\times{\\var{g}})}}{9^{\\var{h}}p^{({-\\var{j}}\\times{\\var{h}})}}$

\n

which can be simplfied according to the known patterns of indices.

\n

i.e.

\n

$\\frac{ax^c}{bx^d}= \\frac{a}{b}x^{(c-d)}$

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "(6^{g})/(9^{h})*p^{h*j-g*f}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "statement": "

Simplify each of the following expressions, giving your answer in its simplest form.

\n

Click 'Show steps' for guidance on which index law is applicable.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(0..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(2..9 except a)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "random(-9..-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "g": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}, "f": {"definition": "random(2..3)", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "h": {"definition": "random(2..5 except g)", "templateType": "anything", "group": "Ungrouped variables", "name": "h", "description": ""}, "j": {"definition": "random(2..3 except f)", "templateType": "anything", "group": "Ungrouped variables", "name": "j", "description": ""}}, "metadata": {"description": "

Simplifying indices.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Solving linear simultaneous equations by elimination", "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": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}], "metadata": {"description": "

This question tests the student's ability to solve simple linear equations by elimination. Part a) involves only having to manipulate one equation in order to solve, and part b) involves having to manipulate both equations in order to solve. 

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "type": "question", "ungrouped_variables": [], "advice": "

a)

\n

\\begin{align}
\\var{h}x+\\var{k}y&=\\var{m}\\text{,}\\\\
\\var{j}x-\\var{l}y&=\\var{n}\\text{.}\\\\
\\end{align}

\n

To find the solution to these equations, we need to cancel one of the unknowns.

\n

Notice that $\\var{h}x$ in the first equation can be multiplied by $\\var{j/h}$ to match $\\var{j}x$ in the second equation. This means that we will only have to manipulate the first equation and can leave the second equation as it is.

\n

We have to multiply the entire first equation by $\\var{j/h}$, not just the $x$ term to ensure the equation still holds. 

\n

$\\var{h}x+\\var{k}y=\\var{m}$ multiplied by $\\var{j/h}$ gives $\\var{j}x+\\var{k*(j/h)}y=\\var{m*(j/h)}.$

\n

We now have a common $x$ term and we can cancel this by subtracting one equation from the other to find the $y$ term. 

\n

\\begin{align}
&&\\var{j}x+\\var{k*{j/h}}y&=\\var{m*(j/h)}\\\\
-&&\\var{j}x-\\var{l}y&=\\var{n}\\\\
&&\\overline{\\qquad} & \\overline{\\qquad}\\\\
&&0x+\\var{k*(j/h)+l}y&=\\var{m*(j/h)-n}\\\\[1em]
&&y&=\\frac{\\var{m*j/h-n}}{\\var{k*j/h+l}}\\\\
&&y&=\\var{y1}
\\end{align}

\n

We can find the corresponding value of $x$ by substituting this value for $y$ back into either of the original equations.

\n

\\begin{align}
\\var{h}x+(\\var{k}\\times\\var{y1})&=\\var{m}\\text{,}\\\\
\\var{h}x+\\var{k*y1}&=\\var{m}\\text{,}\\\\
\\var{h}x&=\\var{m-(k*y1)}\\text{,}\\\\
x&=\\var{x1}\\text{.}\\\\
\\end{align}

\n

Therefore, $x=\\var{x1}$ and $y=\\var{y1}$.

\n

b)

\n

\\begin{align}
\\var{a}x+\\var{b}y&=\\var{c}\\text{,}\\\\
\\var{d}x+\\var{f}y&=\\var{g}\\text{.}\\\\
\\end{align}

\n

To be able to solve the equations, we need to cancel one of the unknowns by manipulating the two equations so that the variable we wish to cancel is of the same value in each equation.

\n

Although we can choose to cancel either variable, $x$ or $y$, a good rule of thumb is to look at the lowest common multiples of the coefficients for each variable and cancel the variable with the lowest LCM.

\n

The LCM of the coefficients of the $x$ terms is $\\var{lcm(a,d)}$.

\n

The LCM of the coefficients of the $y$ terms is $\\var{lcm(b,f)}$.

\n

Therefore, we will choose to cancel the $x$ terms.

\n

We need to multiply the equations individually to achieve the lowest common multiple identified. 

\n

\\begin{align}
\\simplify{ {a}x + {b}y } &= \\var{c} &\\text{multiply by } \\var{lcm(a,d)/a} \\text { to obtain } && \\simplify{ {lcm(a,d)}x + {b*lcm(a,d)/a}y} &= \\var{c*lcm(a,d)/a} \\\\
\\simplify{ {d}x + {f}y } &= \\var{g} &\\text{multiply by } \\var{lcm(a,d)/d} \\text { to obtain } && \\simplify{ {lcm(a,d)}x + {b*lcm(a,d)/d}y} &= \\var{c*lcm(a,d)/d}
\\end{align}

\n

\n

We now have a common $x$ term, and can cancel this by subtracting one equation from the other.

\n

\\begin{align}
&& \\simplify{ {lcm(a,d)}x+{b*lcm(a,d)/a}y } = \\var{c*lcm(a,d)/a} \\\\
- && \\simplify{ {lcm(a,d)}x + {f*lcm(a,d)/d}y } = \\var{g*lcm(a,d)/d} \\\\
&& \\overline{\\simplify[]{ 0x+{b*lcm(a,d)/a-f*lcm(a,d)/d}y} = \\var{c*lcm(a,d)/a-g*lcm(a,d)/d}}
\\end{align}

\n

\\begin{align}
\\var{(b*lcm(a,d)/a)-(f*lcm(a,d)/d)}y &= \\var{(c*lcm(a,d)/a)-(g*lcm(a,d)/d)}\\text{,}\\\\
y &= \\var{y2}\\text{.}
\\end{align}

\n

We can find the corresponding value of $x$ by substituting thsi value of $y$ value back into either of the original equations.

\n

\\begin{align}
\\simplify[]{ {a}x + {b}{y2}} &= \\var{c} \\\\
\\simplify[]{ {a}x + {b*y2}} &= \\var{c} \\\\
\\var{a}x&=\\var{c-b*y2} \\\\
x &= \\var{x2} \\text{.}
\\end{align}

\n

Therefore, $x=\\var{x2}$ and $y=\\var{y2}$.

", "variable_groups": [{"name": "Part b", "variables": ["a", "b", "c", "d", "f", "g", "x2", "y2"]}, {"name": "part a", "variables": ["h", "j", "k", "l", "m", "n", "y1", "x1", "numerator", "divisor"]}], "statement": "", "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

Solve this set of simultaneous equations and give your answers for $x$ and $y$ below.

\n

\\begin{align}
\\simplify{{h}x+{k}y} &= \\var{m} \\text{,} \\\\
\\simplify{{j}x+{l}y} &= \\var{n} \\text{.}
\\end{align}

\n

$x =$ [[0]]

\n

$y =$ [[1]]

", "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "allowFractions": true, "minValue": "x1", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "x1", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "allowFractions": true, "minValue": "y1", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "y1", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0}]}, {"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

Solve this set of simultaneous equations and give your answers for $x$ and $y$ below.

\n

\\begin{align}
\\simplify{{a}x + {b}y} &= \\var{c} \\text{,} \\\\
\\simplify{{d}x + {f}y} &= \\var{g} \\text{.}
\\end{align}

\n

$x =$ [[0]]

\n

$y =$ [[1]]

", "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "allowFractions": true, "minValue": "x2", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "x2", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "allowFractions": true, "minValue": "y2", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "y2", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0}]}], "tags": ["elimination", "linear simultaneous equations", "solving linear simultaneous equations by elimination", "taxonomy"], "preamble": {"js": "", "css": ""}, "functions": {}, "variables": {"c": {"description": "", "group": "Part b", "definition": "a*x2+b*y2", "name": "c", "templateType": "anything"}, "a": {"description": "", "group": "Part b", "definition": "random(2..5)", "name": "a", "templateType": "anything"}, "numerator": {"description": "", "group": "part a", "definition": "m*(j/h)-n", "name": "numerator", "templateType": "anything"}, "l": {"description": "

Constant part of the LHS of the second equation in part a

", "group": "part a", "definition": "random(1..6)", "name": "l", "templateType": "anything"}, "n": {"description": "

RHS of the second equation in part a

", "group": "part a", "definition": "j*x1 + l*y1", "name": "n", "templateType": "anything"}, "g": {"description": "", "group": "Part b", "definition": "d*x2+f*y2", "name": "g", "templateType": "anything"}, "m": {"description": "

RHS of the first equation in part a

", "group": "part a", "definition": "h*x1 + k*y1", "name": "m", "templateType": "anything"}, "divisor": {"description": "", "group": "part a", "definition": "k*(j/h)+l", "name": "divisor", "templateType": "anything"}, "y1": {"description": "

Value of $x$ in part a

", "group": "part a", "definition": "random(-5..-1)*sgn(x1)", "name": "y1", "templateType": "anything"}, "y2": {"description": "

Value of $y$ in part b

", "group": "Part b", "definition": "random(-5..-1)*sgn(x2)", "name": "y2", "templateType": "anything"}, "x2": {"description": "

Value of $x$ in part b

", "group": "Part b", "definition": "random(-5..5)", "name": "x2", "templateType": "anything"}, "x1": {"description": "

Value of $x$ in part a

", "group": "part a", "definition": "random(-5..5)", "name": "x1", "templateType": "anything"}, "k": {"description": "

Constant part of the LHS of the first equation in part a

", "group": "part a", "definition": "random(1..6)", "name": "k", "templateType": "anything"}, "j": {"description": "

$x$ coefficient of the second equation in part a. An integer multiple of the $x$ coefficient of the second equation.

", "group": "part a", "definition": "h*random(2..3)", "name": "j", "templateType": "anything"}, "b": {"description": "

Coefficient of $y$ in the first equation of part b.

\n

", "group": "Part b", "definition": "random(a+1..7)", "name": "b", "templateType": "anything"}, "f": {"description": "

$y$ coefficient of the second equation in part b. Never an integer multiple of the $y$ coefficient in the first equation.

", "group": "Part b", "definition": "random(max(a,b)+1..12 except map(j*b,j,0..10/b))", "name": "f", "templateType": "anything"}, "h": {"description": "

$x$ coefficient of the first equation in part a

", "group": "part a", "definition": "random(2..5)", "name": "h", "templateType": "anything"}, "d": {"description": "

$x$ coefficient in the second equation of part b. Never an integer multiple of the $x$ coefficient in the first equation.

", "group": "Part b", "definition": "random(a+1..9 except map(j*a,j,0..10/a))", "name": "d", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": "lcm(a,d)You have 5 minutes left

"}, "allowPause": false, "timeout": {"action": "none", "message": ""}}, "percentPass": "80", "type": "exam", "contributors": [{"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}], "extensions": ["geogebra", "jsxgraph", "stats"], "custom_part_types": [], "resources": []}