// Numbas version: finer_feedback_settings {"name": "Summer Bridge Course", "metadata": {"description": "

This is for the Summer Bridge Course in Mathematics . This exam will test their previous knowledge.

", "licence": "None specified"}, "duration": 0, "percentPass": "30", "showQuestionGroupNames": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", "", "", ""], "questions": [{"name": "Laws of Indices", "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": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "tags": ["indices", "laws of indices", "powers", "taxonomy"], "metadata": {"description": "

This question aims to test understanding and ability to use the laws of indices.

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

Using the laws of indices, simplify each expression down to its simplest form. Recall that $a^{0} = 1$ for any number $a$.

", "advice": "

a)

\n

Here we are using the rule of indices: $a^m \\times a^n = a^{m+n}$.

\n

Using this rule, 

\n

\\[
\\begin{align}
a^\\var{x} \\times a^\\var{y}\\ &= a^\\simplify[all, !collectNumbers]{{x}+{y}}\\\\
&= a^\\var{x+y}.
\\end{align}
\\]

\n

b)

\n

We are asked to find $\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q}$.

\n

Notice there is a constant in front of each of the terms.

\n

To do this, write the product out explicitly, as

\n

\\[\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q} = \\var{c} \\times \\var{d} \\times a^\\var{p} \\times a^\\var{q}.\\]

\n

We know that $\\var{c} \\times \\var{d} = \\var{c*d}$, and using the rule of indices: $a^\\var{p} \\times a^\\var{q} = a^\\var{p+q}$.

\n

Therefore:

\n

\\begin{align}
\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q}&= \\var{c*d} \\times a^\\var{p+q} \\\\
&= \\simplify{{c*d}*a^{p+q}}.
\\end{align}

\n

c)

\n

Here we are using: $a^m \\div a^n = a^{m-n}$.

\n

We are asked to simplify the expression, $\\displaystyle\\simplify{{b}*a^{x}/({g}*a^{y})}$.

\n

To do this, we just have to use the previously mentioned rule of indices. We write this out explicity as

\n

\\[\\simplify{{b}*a^{x}/({g}*a^{y})} = \\simplify{{b}/{g}} \\times \\simplify{a^{x}/(a^{y})}.\\]

\n

Using rules of indices,

\n

\\begin{align}                                                                                                                                                                                                                                                                                           \\frac{a^\\var{x}}{a^\\var{y}} &= a^\\var{x} \\div a^\\var{y}\\\\
&= a^\\simplify[all, !collectNumbers]{{x}-{y}}\\\\
&= a^\\var{x-y}.
\\end{align}

\n

Therefore,

\n

\\begin{align}
\\frac{\\var{b}a^\\var{x}}{\\var{g}a^\\var{y}} &= \\simplify{{b}/{g}} \\times \\simplify{a^{{x}-{y}}}\\\\
&= \\simplify{{b}/{g}*a^{x-y}}.
\\end{align}

\n

Alternatively, 

\n

Using the rule of indices: $a^{-m}  = \\displaystyle\\frac{1}{a^{m}}$, we can rewrite the question as:

\n

\\begin{align}
\\frac{\\var{b}a^\\var{x}}{\\var{g}a^\\var{y}} &= \\simplify{{b}/{g}} \\times \\frac{a^\\var{x}}{a^\\var{y}}\\\\
&= \\simplify{{b}/{g}} \\times a^\\var{x} \\times a^{-\\var{y}}.
\\end{align}

\n

And then using the rule: $a^m \\times a^n = a^{m+n}$, this becomes:

\n

\\begin{align}
\\simplify{{b}/{g}} \\times a^\\var{x} \\times a^{-\\var{y}} &= \\simplify{{b}/{g}} \\times a^\\simplify[all,!collectNumbers]{{x}+(-{y})}\\\\
&= \\simplify{{b}/{g}*a^{x-y}}.
\\end{align}

\n

d)

\n

The question asks us to simplify $(\\simplify{{c}*a^{p}})^{\\var{q}}$.

\n

To do this we use the rules:

\n

\\[(a^{m})^{n} = a^{mn},\\]

\n

\\[(ab)^m = a^mb^m.\\]

\n

We can then expand the equation as

\n

\\[(\\simplify{{c}*a^{p}})^{\\var{q}}= \\var{c}^{\\var{q}} \\times (a^{\\var{p}})^{\\var{q}}.\\]

\n

Then using the rule of indices mentioned previously,

\n

\\[
\\begin{align}
(\\simplify{{c}*a^{p}})^{\\var{q}}&= \\simplify{{c}^{q}} \\times a^\\var{p*q}\\\\
&= \\simplify{{c}^{q}*a^{p*q}}.
\\end{align}
\\]

\n

e)

\n

The question asks us to simplify $\\sqrt[\\var{d}]{\\var{x}^\\var{d}a}$.

\n

To do this we use the rules:

\n

\\[a^\\frac{1}{m} = \\sqrt[m]{a},\\]

\n

\\[(ab)^m = a^mb^m.\\]

\n

We can expand the expression as follows:

\n

\\[
\\begin{align}
\\sqrt[\\var{d}]{a} &= (\\simplify{a})^\\frac{1}{\\var{d}}\\\\
&= a^\\frac{1}{\\var{d}}.
\\end{align}
\\]

\n

f)

\n

The question requires us to simplify $\\sqrt[\\var{c}]{a^\\var{q}}$.

\n

Here, we use the rule of indices: $a^\\frac{n}{m} = \\sqrt[m]{a^n}$, allowing us to expand the expression as follows:

\n

\\[
\\begin{align}
\\sqrt[\\var{c}]{\\simplify{a^{q}}} &= \\simplify[fractionnumbers,all]{(a^{q})^{{1}/{{c}}}}\\\\
&= \\simplify[fractionnumbers,all]{a^{{q}/{c}}}.
\\end{align}
\\]

", "rulesets": {}, "variables": {"g": {"name": "g", "group": "Ungrouped variables", "definition": "random(2..9 except b)", "description": "

Used in part c

", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2,4)", "description": "

Used in parts b,d and f

", "templateType": "anything"}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "random(2..9 except y)", "description": "

Used in parts a,c and e

", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(3..5)", "description": "

Used in parts b and e

", "templateType": "anything"}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "

Used in parts b and d

", "templateType": "anything"}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(3,5)", "description": "

Used in parts b,d and f

", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "

Used in part c

", "templateType": "anything"}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "

\n

Used in parts a,c and f

", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["x", "y", "c", "d", "p", "q", "b", "g"], "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": "

Write $a^{\\var{x}} \\times a^{\\var{y}}$ as a single power of $a$.

\n

\n

$a^{\\var{x}} \\times a^{\\var{y}} =$ [[0]].

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Use the rule: $a^m \\times a^n = a^{m+n}$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "a^{x+y}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "a^?`?", "partialCredit": 0, "message": "You haven't simplified: your answer is not in the form $a^?$.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "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": "

Write $\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q}$ as an integer multiplied by a single power of $a$.

\n

$\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q} =$ [[0]].

\n

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{c*d}*a^{p+q}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "$n*a^?`?", "partialCredit": 0, "message": "You haven't simplified: your answer is not in the form $?a^?$.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "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": "

Write $\\displaystyle\\simplify{{b}*a^{x}/({g}*a^{y})}$ as a number multiplied by a single power of $a$.

\n

$\\displaystyle\\simplify{{b}*a^{x}/({g}*a^{y})} =$ [[0]].

\n

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

You could use one of the following rules:

\n

$a^m \\div a^n = a^{m-n}$.

\n

$a^{-m} = \\displaystyle\\frac{1}{a^m}$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{b}/{g}a^{x-y}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "$n/$n`? * a^?`?", "partialCredit": 0, "message": "You haven't simplified: your answer is not in the form $\\frac{?}{?} \\cdot a^?$.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "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": "

Write $(\\simplify{{c}*a^{p}})^{\\var{q}}$ as an integer multiplied by a single power of $a$.

\n

$(\\simplify{{c}*a^{p}})^{\\var{q}} =$ [[0]].

\n

", "stepsPenalty": 0, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Use the rules:

\n

$(ab)^m = a^mb^m$.

\n

$(a^m)^n = a^{mn}$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{c^{q}}*a^{p*q}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "$n`?*a^?`?", "partialCredit": 0, "message": "You must write your answer as an integer multiplied by a power of $a$.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "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": "

Write $\\sqrt[\\var{d}]{a}$ as a single power of $a$. 

\n

$\\sqrt[\\var{d}]{a} =$ [[0]].

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Use the rule: $a^\\frac{1}{m} = \\sqrt[m]{a}$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "a^(1/{d})", "answerSimplification": "basic", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "a^?`?", "partialCredit": 0, "message": "

You must input your answer as a single power of a.

", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "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": "

Write $\\sqrt[\\var{q}]{a^\\var{c}}$ as a single power of $a$.

\n

$\\sqrt[\\var{q}]{a^\\var{c}} =$ [[0]].

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Use the rule: $a^\\frac{n}{m} = \\sqrt[m]{a^n}$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "a^({c}/{q})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "a^?`?", "partialCredit": 0, "message": "

You must input your answer as a single power of a.

", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "sortAnswers": false}], "type": "question"}, {"name": "Decimals to fractions", "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/"}], "variable_groups": [{"variables": ["a", "b", "c", "d", "b_", "b_coprime", "d_coprime", "answer", "cround"], "name": "Part a"}, {"variables": ["f", "f2", "mygcd", "h", "j", "k", "f3", "f4", "f1000", "numerator", "g", "gcd1", "numerator_coprime", "g_coprime"], "name": "Part b"}], "functions": {}, "rulesets": {}, "ungrouped_variables": [], "metadata": {"description": "

Identify well-known fractional equivalents of decimals. Convert obscure decimals and recurring decimals into fractions.

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

a)

\n

To convert a decimal into a fraction, firstly place the decimal over $1$ as a fraction, and then multiply both the numerator and denominator by $10$ for however many decimal places the decimal has. For example, if the decimal was $0.1$, you would multiply the fraction by $10$ as there is one decimal place. If the decimal was $0.01$, you would multiply it by $100$, as there are two decimal places.  

\n

i)

\n

$\\var{a}$

\n

\\[
\\frac{\\var{a}}{1}\\times\\frac{10}{10}=\\frac{\\var{10a}}{10}\\text{.}
\\]

\n

ii)

\n

$\\var{b}$

\n

\\[
\\frac{\\var{b}}{1}\\times\\frac{100}{100}=\\frac{\\var{100b}}{100}=\\simplify{{100b}/{100}}\\text{.}
\\]

\n

iii)

\n

\n

$\\var{d}$

\n

\\[
\\frac{\\var{d}}{1}\\times\\frac{10}{10}=\\frac{\\var{10d}}{10}=\\simplify{{10d}/{10}}\\text{.}
\\]

\n

iv)

\n

\n

$0.\\dot{\\var{c}}$

\n

To convert a recurring decimal to a fraction, the first step is to set up a simple equation where

\n

\\[
x=0.\\dot{\\var{c}}\\text{.}
\\]

\n

By multiplying both sides by $10$, we can gain another simple equation where

\n

\\[
10x=\\var{c}.\\dot{\\var{c}}\\text{.}
\\]

\n

By subtracting one equation from the other, we can find the fraction equivalent of the recurring decimal. 

\n

\\[
\\begin{align}
&&\\var{c}.\\dot{\\var{c}}&={10}x\\\\
-&&{0.\\dot{\\var{c}}}&=x\\\\
&&\\overline{\\qquad} & \\overline{\\qquad}\\\\
&&{\\var{c}}&=9x\\\\
\\\\
&&\\frac{\\var{c}}{9}&=x
\\end{align}
\\]

\n

$\\displaystyle\\frac{\\var{c}}{9}$ simplifies to $\\simplify{{{c}}/{9}}$ by dividing by $3$ and therefore, $0.\\dot{\\var{c}}=\\simplify{{{c}}/{9}}$ in its fractional form.}

\n

\n

b)

\n

$\\displaystyle\\var{f}$

\n

\\[
\\var{f}\\times\\frac{\\var{f1000}}{\\var{f1000}}=\\frac{\\var{f2}}{\\var{f1000}}\\text{.}
\\]

\n

From this, we can look to see if we can cancel down the fraction by finding the highest common divisor between the numerator and denominator. This is $\\var{mygcd}$.

\n

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

\n

Simplifying by this amount gives the final answer

\n

\\[\\frac{\\var{f3}}{\\var{f4}}.\\]

\n

c)

\n

$\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}}.$

\n

To convert a recurring decimal to a fraction, the first step is to set up a simple equation where,

\n

$x=\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}}.$

\n


By multiplying both sides by $100$ to isolate the recurring section on the left hand side of the decimal point, we can gain another simple equation

\n

$100x=\\var{h}\\var{j}\\var{k}.\\dot{\\var{j}}\\dot{\\var{k}}.$

\n

\n

Now that we have two equations in terms of $x$, we can subtract one from the other and solve to get a value of $x$.

\n

\\[
\\begin{align}
&&\\var{h}\\var{j}\\var{k}.\\dot{\\var{j}}\\dot{\\var{k}}&=100x\\\\
-&&\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}}&=x\\\\
&&\\overline{\\qquad} & \\overline{\\qquad} 
\\\\
&&{{\\var{h}}\\var{j}\\var{k-h}}&=99x\\\\
\\\\
&&\\frac{\\var{numerator}}{\\var{g}}&=x\\text{.}\\\\
\\end{align}
\\]

\n

From this, we should look to see if it is possible to simplify by finding the greatest common divisor of the numerator and the denominator. The greatest common divisor is $\\var{gcd1 }.$

\n

Therefore, it is not possible to simplify and so

\n

Simplifying by this value gives the fraction $\\displaystyle\\simplify{{{numerator}}/{g}}$ and so  

\n

\\[
\\begin{align}
\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}}=\\simplify{{{numerator}}/{g}}\\text{ in its fractional form.}\\\\
\\end{align}
\\]

", "statement": "

Fractions can be equivalently represented as decimals and vice versa. One form may be more useful in a context than another and it is useful to practise how to change between them.

\n

Have a go at these questions involving fractions and decimals, remembering to write your answer in its simplest form.  

", "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}\n", "js": ""}, "variables": {"answer": {"templateType": "anything", "description": "", "name": "answer", "group": "Part a", "definition": "round(10c-c)"}, "cround": {"templateType": "anything", "description": "", "name": "cround", "group": "Part a", "definition": "c/3"}, "g": {"templateType": "anything", "description": "", "name": "g", "group": "Part b", "definition": "99"}, "j": {"templateType": "anything", "description": "", "name": "j", "group": "Part b", "definition": "random(1..9)"}, "g_coprime": {"templateType": "anything", "description": "", "name": "g_coprime", "group": "Part b", "definition": "g/gcd1"}, "d": {"templateType": "anything", "description": "", "name": "d", "group": "Part a", "definition": "random(0.2,0.4,0.6,0.8)"}, "a": {"templateType": "anything", "description": "", "name": "a", "group": "Part a", "definition": "random(0.1,0.3,0.7,0.9)"}, "gcd1": {"templateType": "anything", "description": "", "name": "gcd1", "group": "Part b", "definition": "gcd(numerator,g)"}, "h": {"templateType": "anything", "description": "", "name": "h", "group": "Part b", "definition": "random(1..5)"}, "b": {"templateType": "anything", "description": "", "name": "b", "group": "Part a", "definition": "random(0.25,0.75)"}, "f4": {"templateType": "anything", "description": "", "name": "f4", "group": "Part b", "definition": "f1000/gcd(f2,f1000)"}, "d_coprime": {"templateType": "anything", "description": "", "name": "d_coprime", "group": "Part a", "definition": "10d/gcd(10d,10)"}, "f1000": {"templateType": "anything", "description": "", "name": "f1000", "group": "Part b", "definition": "1000"}, "numerator_coprime": {"templateType": "anything", "description": "", "name": "numerator_coprime", "group": "Part b", "definition": "numerator/gcd1"}, "c": {"templateType": "anything", "description": "", "name": "c", "group": "Part a", "definition": "random(3,6)"}, "k": {"templateType": "anything", "description": "", "name": "k", "group": "Part b", "definition": "random(h..9 except j except h)"}, "f2": {"templateType": "anything", "description": "", "name": "f2", "group": "Part b", "definition": "precround(f1000*f,0)"}, "f3": {"templateType": "anything", "description": "", "name": "f3", "group": "Part b", "definition": "f2/gcd(f2,f1000)"}, "numerator": {"templateType": "anything", "description": "", "name": "numerator", "group": "Part b", "definition": "h*100+j*10+k - h"}, "mygcd": {"templateType": "anything", "description": "", "name": "mygcd", "group": "Part b", "definition": "gcd(f2,f1000)"}, "b_": {"templateType": "anything", "description": "", "name": "b_", "group": "Part a", "definition": "gcd(100*b,100)"}, "f": {"templateType": "anything", "description": "", "name": "f", "group": "Part b", "definition": "random(0.1..0.8#0.002)"}, "b_coprime": {"templateType": "anything", "description": "", "name": "b_coprime", "group": "Part a", "definition": "100*b/b_"}}, "parts": [{"variableReplacementStrategy": "originalfirst", "prompt": "

Express these common decimals as their fraction equivalent.

\n

i)

\n

$\\var{a}=$  [[0]] [[1]]

\n

ii)

\n

$\\var{b}=$  [[2]] [[3]]

\n

iii)

\n

$\\var{d}=$  [[6]] [[7]]

\n

iv)

\n

$0.\\dot{\\var{c}}=$  [[4]] [[5]]

", "gaps": [{"variableReplacementStrategy": "originalfirst", "marks": "0.5", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "a*10", "allowFractions": false, "minValue": "a*10", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "marks": "0.5", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "10", "allowFractions": false, "minValue": "10", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "marks": "0.5", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "b_coprime", "allowFractions": false, "minValue": "b_coprime", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "marks": "0.5", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "4", "allowFractions": false, "minValue": "4", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "marks": "0.5", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "cround", "allowFractions": false, "minValue": "cround", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "marks": "0.5", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "3", "allowFractions": false, "minValue": "3", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "marks": "0.5", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "d_coprime", "allowFractions": false, "minValue": "d_coprime", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "marks": "0.5", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "5", "allowFractions": false, "minValue": "5", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0}], "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "scripts": {}}, {"variableReplacementStrategy": "originalfirst", "prompt": "

Convert this decimal to a fraction, giving your answer in its simplest form. 

\n

$\\displaystyle\\var{f} = $  [[0]] [[1]]

\n

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

Convert these decimals to a fraction, giving your answer in its simplest form. 

\n

ii)

\n

$\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}} = $  [[0]] [[1]]

", "gaps": [{"variableReplacementStrategy": "originalfirst", "marks": 1, "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "numerator_coprime", "allowFractions": false, "minValue": "numerator_coprime", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "marks": 1, "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "g_coprime", "allowFractions": false, "minValue": "g_coprime", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0}], "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "scripts": {}}], "tags": ["convert decimals to fractions", "converting recurring decimals to fractions", "Decimals", "decimals", "fractions", "Fractions", "identify fractional equivalents of decimals", "recurring decimals", "taxonomy"], "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Division of fractions", "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": "

Several problems involving dividing fractions, with increasingly difficult examples, including mixed numbers and complex fractions. 

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

a)

\n

When faced with dividing fractions, it much easier to switch one of the fractions around and multiply them together instead of divide them.

\n

\\[ \\left( \\frac{\\var{f_coprime}}{\\var{g_coprime}}\\div\\frac{\\var{h_coprime}}{\\var{j_coprime}} \\right) \\equiv \\left( \\frac{\\var{f_coprime}}{\\var{g_coprime}}\\times\\frac{\\var{j_coprime}}{\\var{h_coprime}} \\right) = \\frac{\\var{fj}}{\\var{gh}} \\]

\n

Then, simplify by finding the highest common divisor in the numerator and denominator which in this case is $\\var{gcd1}$. 

\n

This gives a final answer of $\\displaystyle\\simplify{{fj}/{gh}}$.

\n

\n

b)

\n

\\[ \\frac{\\var{f1_coprime}}{\\var{g1_coprime}}\\div\\frac{\\var{h1_coprime}}{\\var{j1_coprime}} \\equiv \\left( \\frac{\\var{f1_coprime}}{\\var{g1_coprime}}\\times\\frac{\\var{j1_coprime}}{\\var{h1_coprime}} \\right)=\\frac{\\var{f1j1}}{\\var{g1h1}} \\]

\n

Then, simplify by finding the highest common divisor in the numerator and denominator which in this case is $\\var{gcd2}$.

\n

This gives a final answer of $\\displaystyle\\simplify{{f1j1}/{g1h1}}$.

\n

\n

c)

\n

\\[ {\\var{f3}\\frac{\\var{g3_coprime}}{\\var{h3_coprime}}}\\div{\\var{f4}\\frac{\\var{g4_coprime}}{\\var{h4_coprime}}} \\]

\n

The first thing to do is to change the mixed numbers into improper fractions.

\n

An improper fraction is a fraction where the numerator is greater than the denominator. To change a mixed fraction to an improper fraction, multiply the integer part of the mixed number by the denominator, and add it to the existing numerator to make the new numerator of the improper fraction. The denominator will stay the same. 

\n

\\[ {\\var{f3}\\frac{\\var{g3_coprime}}{\\var{h3_coprime}}}\\equiv\\frac{(\\var{f3}\\times\\var{h3_coprime})+\\var{g3_coprime}}{\\var{h3_coprime}}=\\frac{\\var{f3h3}+\\var{g3_coprime}}{\\var{h3_coprime}}=\\frac{\\var{f3h3+g3_coprime}}{\\var{h3_coprime}} \\]

\n

\\[ {\\var{f4}\\frac{\\var{g4_coprime}}{\\var{h4_coprime}}}\\equiv\\frac{(\\var{f4}\\times\\var{h4_coprime})+\\var{g4_coprime}}{\\var{h4_coprime}}=\\frac{\\var{f4h4}+\\var{g4_coprime}}{\\var{h4_coprime}}=\\frac{\\var{f4h4+g4_coprime}}{\\var{h4_coprime}} \\]

\n

We now have our mixed numbers as improper fractions.

\n

\\[ \\frac{\\var{f3h3+g3_coprime}}{\\var{h3_coprime}}\\div\\frac{\\var{f4h4+g4_coprime}}{\\var{h4_coprime}} \\]

\n

Now, use the same method as in parts a) and b) to divide by switching around one fraction and changing the division symbol to multiplication.

\n

\\[ \\frac{\\var{f3h3+g3_coprime}}{\\var{h3_coprime}}\\div\\frac{\\var{f4h4+g4_coprime}}{\\var{h4_coprime}}\\equiv\\frac{\\var{f3h3+g3_coprime}}{\\var{h3_coprime}}\\times\\frac{\\var{h4_coprime}}{\\var{f4h4+g4_coprime}}=\\frac{\\var{num}}{\\var{denom}} \\]

\n

Finally, the last thing to do is to simplify your answer down by finding the highest common divisor in the numerator and denominator, which in this case is $\\var{gcd3}$.

\n

By doing this, you will get a final answer of

\n

\\[ \\simplify{{num}/{denom}} \\]

\n

d)

\n

\\[ \\frac{\\var{a}}{(\\simplify[all,!collectNumbers]{{b}-{c}/{d}})} \\]

\n

Consider the denominator first, as following the rules of BODMAS, you should address brackets first.

\n

You need to get a common denominator for both terms on the denominator, like this:

\n

\\[ \\var{b}\\times\\frac{\\var{d}}{\\var{d}} = \\frac{\\var{bd}}{\\var{d}} \\]

\n

This now allows you to complete the addition or subtraction as both terms have a common denominator. 

\n

\\[ {\\simplify[all,!collectNumbers]{{bd}/{d}-{c}/{d}}} = \\frac{\\var{bd_c}}{\\var{d}} \\]

\n

This means that the expression is now:

\n

\\[ \\frac{\\var{a}}{\\frac{\\var{bd_c}}{\\var{d}}} \\]

\n

Dealing with this requires a bit of manipulation. You have to change the divisor of the denominator to be a mulitplier of the numerator. The denominator, ${\\var{bd_c}}$ was being divided by ${\\var{d}}$ but by flipping it around, the numerator, ${\\var{a}}$ will be mulitplied by ${\\var{d}}$. The value of the expression remains the same.

\n

\\[ \\frac{\\var{a}}{\\frac{\\var{bd_c}}{\\var{d}}}\\equiv \\frac{(\\var{a})\\times(\\var{d})}{\\var{bd_c}}= \\frac{\\var{ad}}{\\var{bd_c}} \\]

\n

From this, you can try to cancel the expression down by finding the highest common factor of the numerator and denominator, to give a final answer of

\n

\\[ \\simplify{{ad}/{bd_c}} \\]

", "variable_groups": [{"name": "part d", "variables": ["a", "b", "c", "d", "bd", "ad", "gcd", "ad_gcd", "bcd_gcd", "bd_c"]}, {"name": "part a", "variables": ["f", "g", "f_coprime", "g_coprime", "h", "j", "h_coprime", "j_coprime", "fj", "gh", "gcd1"]}, {"name": "part b", "variables": ["f1", "g1", "f1_coprime", "g1_coprime", "h1", "j1", "h1_coprime", "j1_coprime", "f1j1", "g1h1", "gcd2"]}, {"name": "part c", "variables": ["f3", "g3", "h3", "g3_coprime", "h3_coprime", "f4", "g4", "h4", "g4_coprime", "h4_coprime", "f3h3", "f4h4", "num", "denom", "gcd3"]}], "statement": "

Evaluate the following sums involving division of fractions. Simplify your answers where possible. 

", "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "prompt": "

$\\displaystyle\\frac{\\var{f_coprime}}{\\var{g_coprime}}\\div\\frac{\\var{h_coprime}}{\\var{j_coprime}}=$  [[0]] [[1]]

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

$\\displaystyle\\frac{\\var{f1_coprime}}{\\var{g1_coprime}}\\div\\frac{\\var{h1_coprime}}{\\var{j1_coprime}}=$  [[0]] [[1]]

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

$\\displaystyle{\\var{f3}\\frac{\\var{g3_coprime}}{\\var{h3_coprime}}}\\div{\\var{f4}\\frac{\\var{g4_coprime}}{\\var{h4_coprime}}}=$  [[0]] [[1]]

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

$\\displaystyle\\frac{\\var{a}}{(\\simplify[all,!collectNumbers]{{b}-{c}/{d}})} =$  [[0]] [[1]]

", "variableReplacements": [], "showFeedbackIcon": true, "marks": 0, "gaps": [{"correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "showFeedbackIcon": true, "marks": 1, "minValue": "ad_gcd", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "ad_gcd", "mustBeReduced": false, "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "showFeedbackIcon": true, "marks": 1, "minValue": "bcd_gcd", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "bcd_gcd", "mustBeReduced": false, "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}]}], "tags": ["dividing fractions", "division of fractions", "fractions", "Fractions", "mixed numbers", "taxonomy"], "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}\n", "js": ""}, "functions": {}, "variables": {"f4h4": {"description": "

variable f4 times h4.

\n

Used in part c)

", "group": "part c", "definition": "f4*h4_coprime", "name": "f4h4", "templateType": "anything"}, "g4_coprime": {"description": "

PART C

", "group": "part c", "definition": "g4/gcd(g4,h4)", "name": "g4_coprime", "templateType": "anything"}, "h4": {"description": "

Random number but not the same number as variable g4.

\n

Used in part c.

", "group": "part c", "definition": "random(5..8 except g4)", "name": "h4", "templateType": "anything"}, "g": {"description": "

Random number between 2 and 10 and not the same number as variable f.

\n

Used in part a).

", "group": "part a", "definition": "random(f..12 except f) ", "name": "g", "templateType": "anything"}, "a": {"description": "

Random number between 1 and 20

\n

Used by part d)

", "group": "part d", "definition": "random(1..10#1)", "name": "a", "templateType": "randrange"}, "bd_c": {"description": "

Unsimplified denominator for part d).

", "group": "part d", "definition": "(bd-c)", "name": "bd_c", "templateType": "anything"}, "h3_coprime": {"description": "

PART C

", "group": "part c", "definition": "h3/gcd(g3,h3)", "name": "h3_coprime", "templateType": "anything"}, "f_coprime": {"description": "

PART A

", "group": "part a", "definition": "f/gcd(f,g)", "name": "f_coprime", "templateType": "anything"}, "g_coprime": {"description": "

PART A

", "group": "part a", "definition": "g/gcd(f,g)", "name": "g_coprime", "templateType": "anything"}, "j1_coprime": {"description": "

PART B

", "group": "part b", "definition": "j1/gcd(h1,j1)", "name": "j1_coprime", "templateType": "anything"}, "gcd2": {"description": "

greatest common divisor of variables f1j1 and g1h1.

\n

Used in part b).

", "group": "part b", "definition": "gcd(f1j1,g1h1)", "name": "gcd2", "templateType": "anything"}, "c": {"description": "

Random prime number between -10 and 10.

\n

Used by part d).

", "group": "part d", "definition": "random([-7,-5,-3,-2,-1,1,2,3,5,7] except d)", "name": "c", "templateType": "anything"}, "ad_gcd": {"description": "

Correct answer for the numerator in part d)

", "group": "part d", "definition": "ad/gcd", "name": "ad_gcd", "templateType": "anything"}, "g1_coprime": {"description": "

PART B

", "group": "part b", "definition": "g1/gcd(f1,g1)", "name": "g1_coprime", "templateType": "anything"}, "h1_coprime": {"description": "

PART B

", "group": "part b", "definition": "h1/gcd(h1,j1)", "name": "h1_coprime", "templateType": "anything"}, "gcd3": {"description": "

greatest common denominator for part c. 

", "group": "part c", "definition": "gcd(num,denom)", "name": "gcd3", "templateType": "anything"}, "bd": {"description": "

Variable b times variable d.

\n

Used in part d)

", "group": "part d", "definition": "b*d", "name": "bd", "templateType": "anything"}, "j1": {"description": "

Random number between 2 and 20 and not the same value as variable h1.

\n

Used in part b).

", "group": "part b", "definition": "random(h1..11 except h1)", "name": "j1", "templateType": "anything"}, "g1h1": {"description": "

variable g1 times h1. 

\n

Used in part b).

", "group": "part b", "definition": "g1_coprime*h1_coprime", "name": "g1h1", "templateType": "anything"}, "f": {"description": "

Random number between 2 and 10.

\n

Used in part a).

", "group": "part a", "definition": "random(2..10)", "name": "f", "templateType": "anything"}, "b": {"description": "

Random number between 1 and 10.

\n

Used by part d)

", "group": "part d", "definition": "random(1..10#1)", "name": "b", "templateType": "randrange"}, "bcd_gcd": {"description": "

Correct answer for the denominator in part d).

", "group": "part d", "definition": "{bd_c}/gcd", "name": "bcd_gcd", "templateType": "anything"}, "f4": {"description": "

Random number.

\n

Used in part c).

", "group": "part c", "definition": "random(1..3)", "name": "f4", "templateType": "anything"}, "f1": {"description": "

Random number between 2 and 20.

\n

Used in part b)

", "group": "part b", "definition": "random(2..10)", "name": "f1", "templateType": "anything"}, "d": {"description": "

Random prime number between 10 and 20.

\n

Used in part d).

", "group": "part d", "definition": "random(7,11,13,17)", "name": "d", "templateType": "anything"}, "g3": {"description": "

Random number.

\n

Used in part c).

", "group": "part c", "definition": "random(1..3)", "name": "g3", "templateType": "anything"}, "f3h3": {"description": "

variable f3 times h3.

", "group": "part c", "definition": "f3*h3_coprime", "name": "f3h3", "templateType": "anything"}, "h": {"description": "

Random number from 2 to 10.

\n

Used in part a).

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

variable g times variable h.

\n

Used in part a).

", "group": "part a", "definition": "g_coprime*h_coprime", "name": "gh", "templateType": "anything"}, "j_coprime": {"description": "

PART A

", "group": "part a", "definition": "j/gcd(h,j)", "name": "j_coprime", "templateType": "anything"}, "denom": {"description": "

Unsimplified denominator of part c.

", "group": "part c", "definition": "h3_coprime*(f4h4+g4_coprime)", "name": "denom", "templateType": "anything"}, "j": {"description": "

Random number between 2 and 10 and not the same value as h.

\n

Used in part a).

", "group": "part a", "definition": "random(h..12 except h)", "name": "j", "templateType": "anything"}, "f1j1": {"description": "

variable f1 times j1.

\n

Used in part b).

", "group": "part b", "definition": "f1_coprime*j1_coprime", "name": "f1j1", "templateType": "anything"}, "h4_coprime": {"description": "

PART C

", "group": "part c", "definition": "h4/gcd(g4,h4)", "name": "h4_coprime", "templateType": "anything"}, "g1": {"description": "

Random number between 2 and 30 and not the same value as variable f1.

\n

Used in part b).

", "group": "part b", "definition": "random(f1..11 except f1) ", "name": "g1", "templateType": "anything"}, "fj": {"description": "

variable f times variable j.

\n

Used in part a).

", "group": "part a", "definition": "f_coprime*j_coprime", "name": "fj", "templateType": "anything"}, "gcd": {"description": "

Greatest common divisor of ad and bd_c. 

\n

Used in part d). 

", "group": "part d", "definition": "gcd(ad,bd_c)", "name": "gcd", "templateType": "anything"}, "f3": {"description": "

Random number between 2 and 6.

\n

Used in part c).

", "group": "part c", "definition": "random(1..3#1)", "name": "f3", "templateType": "randrange"}, "f1_coprime": {"description": "

PART B

", "group": "part b", "definition": "f1/gcd(f1,g1)", "name": "f1_coprime", "templateType": "anything"}, "h3": {"description": "

Random number and not the same value as variable g3. 

\n

Used in part c).

", "group": "part c", "definition": "random(5..8)", "name": "h3", "templateType": "anything"}, "gcd1": {"description": "

greatest common divisor of variable fj and gh.

\n

Used in part a).

", "group": "part a", "definition": "gcd(fj,gh)", "name": "gcd1", "templateType": "anything"}, "g3_coprime": {"description": "

PART C

", "group": "part c", "definition": "g3/gcd(g3,h3)", "name": "g3_coprime", "templateType": "anything"}, "h_coprime": {"description": "

PART A

", "group": "part a", "definition": "h/gcd(h,j)", "name": "h_coprime", "templateType": "anything"}, "g4": {"description": "

Random number.

\n

Used in part c).

", "group": "part c", "definition": "random(1..5)", "name": "g4", "templateType": "anything"}, "h1": {"description": "

Random number between 2 and 20. 

\n

Used in part b).

", "group": "part b", "definition": "random(2..10)", "name": "h1", "templateType": "anything"}, "num": {"description": "

numerator of the improper fraction in part c. Unsimplified. 

", "group": "part c", "definition": "h4_coprime*(f3h3+g3_coprime)", "name": "num", "templateType": "anything"}, "ad": {"description": "

Variable a times variable d.

\n

Used in part d).

", "group": "part d", "definition": "a*d", "name": "ad", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Factorising Quadratic Equations with $x^2$ Coefficients Greater than 1", "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/"}], "advice": "

a)

\n

As this question involves a number greater than $1$ before the $x^2$ value it has a factorised form $(ax+b)(cx+d)$.

\n

To find $a$ and $c$, we need to consider the factors of $\\var{a*c}$.

\n

We are already given that one of them is $\\var{a}$, so we know that the other one must be $\\var{c}$.

\n

This means our factorised equation must take the form

\n

\\[(\\var{a}x+b)(\\var{c}x+d)=0\\text{.}\\]

\n

This expands to

\n

\\[ \\simplify{ {a*c}x^2 + ({a}*d+{c}*b)x + a*b} \\]

\n

So we must find two numbers which add together to make $\\var{a*d+b*c}$, and multiply together to make $\\var{b*d}$.

\n

Therefore $b$ and $d$ must satisfy

\n

\\begin{align}
b \\times d &=\\var{b*d}\\\\
\\simplify{{a}d+{c}b} &= \\var{a*d+b*c}\\text{.}
\\end{align}

\n

$b = \\var{b}$ and $d = \\var{d}$ satisfy these equations:

\n

\\begin{align}
\\var{b} \\times \\var{d} &=\\var{b*d}\\\\
\\simplify[]{ {a}*{d} + {b}*{c} } &= \\var{a*d+b*c}
\\end{align}

\n

So the factorised form of the equation is 

\n

\\[ \\simplify{({a}x+{b})({c}x+{d}) = 0} \\text{.}\\]

\n

b)

\n

$\\simplify{({a}x+{b})({c}x+{d}) = 0}$ when either $\\var{a}x+\\var{b} = 0$ or $\\var{c}x+ \\var{d} = 0$.

\n

So the roots of the equation are $\\var[fractionnumbers]{-b/a}$ and $\\var[fractionnumbers]{-d/c}$.

\n

", "statement": "", "variables": {"b": {"templateType": "anything", "name": "b", "description": "

$b$ in $(ax+b)(cx+d)$

", "group": "last q", "definition": "random(-5..5 except 0)"}, "c": {"templateType": "anything", "name": "c", "description": "

$c$ in $(ax+b)(cx+d)$

", "group": "last q", "definition": "random(2..8 except a)"}, "a": {"templateType": "anything", "name": "a", "description": "

$a$ in $(ax+b)(cx+d)$

", "group": "last q", "definition": "random(2..3)"}, "roots": {"templateType": "anything", "name": "roots", "description": "

The roots of the equation

", "group": "last q", "definition": "sort([-b/a,-d/c])"}, "d": {"templateType": "anything", "name": "d", "description": "

$d$ in $(ax+b)(cx+d)$

", "group": "last q", "definition": "random(-8..8 except 0)"}}, "tags": ["coefficient of x^2 greater than 1", "Factorisation", "factorisation", "factorising", "factorising quadratic equations", "Factorising quadratic equations", "factorising quadratic equations with x^2 coefficients greater than 1", "taxonomy"], "ungrouped_variables": [], "functions": {}, "rulesets": {}, "metadata": {"description": "

Factorise a quadratic equation where the coefficient of the $x^2$ term is greater than 1 and then write down the roots of the equation

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "variable_groups": [{"variables": ["a", "b", "c", "d", "roots"], "name": "last q"}], "preamble": {"js": "", "css": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"scripts": {}, "showCorrectAnswer": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "b", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "scripts": {}, "maxValue": "b", "showCorrectAnswer": true, "type": "numberentry", "marks": 1, "variableReplacementStrategy": "originalfirst"}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "c", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "scripts": {}, "maxValue": "c", "showCorrectAnswer": true, "type": "numberentry", "marks": 1, "variableReplacementStrategy": "originalfirst"}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "d", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "scripts": {}, "maxValue": "d", "showCorrectAnswer": true, "type": "numberentry", "marks": 1, "variableReplacementStrategy": "originalfirst"}], "type": "gapfill", "marks": 0, "variableReplacementStrategy": "originalfirst", "prompt": "

Factorise the equation

\n

$\\simplify{{a*c}x^2+{a*d+b*c}x+{b*d}=0}\\text{.}$

\n

$(\\var{a}x+\\phantom{.}$[[0]]$) ($[[1]]$x+\\phantom{.}$[[2]]$)\\; = 0$

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

\n

Write down the roots of the equation above.

\n

Input your answer as $x_1$ and $x_2$, where $x_1<x_2$.

\n

$x_1=$ [[0]]

\n

$x_2=$ [[1]]

", "variableReplacements": [], "showFeedbackIcon": true}]}, {"name": "Fraction multiplication", "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/"}], "advice": "

a)

\n

To multiply $\\displaystyle\\frac{\\var{a_coprime}}{\\var{c_coprime}}\\times\\frac{\\var{b_coprime}}{\\var{d_coprime}}$, address the numerators and denominators separately.

\n

Multiply the numerators across both fractions.

\n

$\\var{a_coprime}\\times\\var{b_coprime}=\\var{ab}$,

\n

and then multiply the denominators across both fractions.

\n

$\\var{c_coprime}\\times\\var{d_coprime}=\\var{cd}$.

\n

The values of the multiplied numerators and denominators will be the numerator and denominator of the new fraction: $\\displaystyle\\frac{\\var{ab}}{\\var{cd}}$.

\n

This answer may need simplifying down, and to do this, find the greatest common divisor in both the numerator and denominator and divide by this number.

\n

The greatest common divisor of $\\var{ab}$ and $\\var{cd}$ is $\\var{gcd}$.

\n

By using $\\var{gcd}$ to cancel down the fraction, the final answer is $\\displaystyle\\simplify{{ab}/{cd}}$.

\n

\n

b)

\n

To multiply $\\displaystyle\\simplify{{k_coprime}/{j_coprime}}\\times\\var{f}\\frac{\\var{g_coprime}}{\\var{h_coprime}}$, we first need to change the mixed number term into an improper fraction. 

\n

To do this, we need to multiply $(\\var{f}\\times\\var{h_coprime}=\\var{fh})$ and add it to what was already on the numerator of the fraction, $\\var{g_coprime}$.

\n

$\\displaystyle\\frac{(\\var{fh}+\\var{g_coprime})}{\\var{h_coprime}}= \\displaystyle\\frac{\\var{numif}}{\\var{h_coprime}}$.

\n

Next, we multiply the numerators and denominators across both fractions separately, as done in part a)

\n

$\\var{k_coprime}\\times\\var{numif} = \\var{num}$,

\n

$\\var{j_coprime}\\times\\var{h_coprime}=\\var{denom}$.

\n

This gives the unsimplified version of the new fraction $\\displaystyle\\frac{\\var{num}}{\\var{denom}}$.

\n

To simplify, find the greatest common divisor in both the numerator and denominator and divide by this number. 

\n

The greatest common divisor of $\\var{num}$ and $\\var{denom}$ is $\\var{gcdb}$.

\n

By using $\\var{gcdb}$ to cancel down the fraction, the final answer is $\\displaystyle\\simplify{{num}/{denom}}$.

\n

\n

\n

c)

\n

To square a fraction means to multiply the fraction by itself. To do this, multiply the numerators and denominators across individually.

\n

$\\displaystyle\\bigg(\\frac{\\var{l_coprime}}{\\var{m_coprime}}\\bigg)^2=\\frac{\\var{l_coprime}}{\\var{m_coprime}}\\times\\frac{\\var{l_coprime}}{\\var{m_coprime}}=\\frac{\\var{l_coprime^2}}{\\var{m_coprime^2}}.$

\n

From this, we should look if it is possible to simplify by finding the highest common divisor of $\\var{l_coprime^2}$ and $\\var{m_coprime^2}.$

\n

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

\n

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

\n

By simplifying with this value, the final answer is

\n

$\\displaystyle\\frac{\\var{l_coprime2}}{\\var{m_coprime2}}$.

\n

\n

d)

\n

Helen was on holiday for $28$ days and spent $\\displaystyle\\frac{\\var{aa}}{7}$ of her time in Spain. 

\n

$\\displaystyle\\frac{\\var{aa}}{7}\\times\\frac{28}{1}=\\frac{\\var{bb}}{7}=\\var{cc}$ days in Spain. 

\n

Whilst in Spain, she spends $\\displaystyle\\frac{\\var{dd}}{4}$ of her time in Barcelona.

\n

$\\displaystyle\\frac{\\var{dd}}{4}\\times\\frac{\\var{cc}}{1}=\\frac{\\var{ddcc}}{4}=\\var{ee}$ days in Barcelona. 

\n

", "statement": "

Evaluate the following multiplications, giving each fraction in its simplest form.

", "variables": {"k": {"name": "k", "group": "Part b", "templateType": "anything", "description": "

Random number between 1 and 20

", "definition": "random(1..7 except j)"}, "bb": {"name": "bb", "group": "Part d", "templateType": "anything", "description": "", "definition": "28*aa"}, "cc": {"name": "cc", "group": "Part d", "templateType": "anything", "description": "", "definition": "bb/7"}, "g": {"name": "g", "group": "Part b", "templateType": "randrange", "description": "

Random number between 1 and 20.

", "definition": "random(1..7#1)"}, "cd": {"name": "cd", "group": "Part a", "templateType": "anything", "description": "

Variable c times variable d.

", "definition": "c_coprime*d_coprime"}, "a": {"name": "a", "group": "Part a", "templateType": "anything", "description": "

Random number from 1 to 12.

", "definition": "random(2..12 except c)"}, "d": {"name": "d", "group": "Part a", "templateType": "randrange", "description": "

Random number from 1 to 12.

", "definition": "random(2..12#1)"}, "l": {"name": "l", "group": "Part c", "templateType": "anything", "description": "", "definition": "random(1..12)"}, "numif": {"name": "numif", "group": "Part b", "templateType": "anything", "description": "

Numerator of the improper fraction converted from a mixed number.

", "definition": "(f*h_coprime)+g_coprime"}, "gcd_gh": {"name": "gcd_gh", "group": "Part b", "templateType": "anything", "description": "", "definition": "gcd(g,h)"}, "fh": {"name": "fh", "group": "Part b", "templateType": "anything", "description": "

Variable f times variable h

", "definition": "f*h_coprime"}, "g_coprime": {"name": "g_coprime", "group": "Part b", "templateType": "anything", "description": "", "definition": "g/gcd_gh"}, "j_coprime": {"name": "j_coprime", "group": "Part b", "templateType": "anything", "description": "", "definition": "j/gcd_kj"}, "gcd_kj": {"name": "gcd_kj", "group": "Part b", "templateType": "anything", "description": "", "definition": "gcd(k,j)"}, "f": {"name": "f", "group": "Part b", "templateType": "randrange", "description": "

Random number between 1 and 4 - integer part of the mixed number.

", "definition": "random(1..4#1)"}, "c_coprime": {"name": "c_coprime", "group": "Part a", "templateType": "anything", "description": "", "definition": "c/gcd_ac"}, "gcd": {"name": "gcd", "group": "Part a", "templateType": "anything", "description": "", "definition": "gcd(ab,cd)"}, "b": {"name": "b", "group": "Part a", "templateType": "randrange", "description": "

Random number from 1 to 12.

", "definition": "random(2..12#1)"}, "d_coprime": {"name": "d_coprime", "group": "Part a", "templateType": "anything", "description": "", "definition": "d/gcd_bd"}, "ddcc": {"name": "ddcc", "group": "Part d", "templateType": "anything", "description": "", "definition": "dd*cc"}, "gcdb": {"name": "gcdb", "group": "Part b", "templateType": "anything", "description": "", "definition": "gcd(num,denom)"}, "gcd_ac": {"name": "gcd_ac", "group": "Part a", "templateType": "anything", "description": "

PART A

", "definition": "gcd(a,c)"}, "denom": {"name": "denom", "group": "Part b", "templateType": "anything", "description": "

Denominator of new fraction.

", "definition": "j_coprime*(h_coprime/gcda)"}, "l_coprime": {"name": "l_coprime", "group": "Part c", "templateType": "anything", "description": "", "definition": "l/gcd_lm"}, "m": {"name": "m", "group": "Part c", "templateType": "anything", "description": "", "definition": "random(1..12 except l)"}, "a_coprime": {"name": "a_coprime", "group": "Part a", "templateType": "anything", "description": "", "definition": "a/gcd_ac"}, "h": {"name": "h", "group": "Part b", "templateType": "randrange", "description": "

Random number between 1 and 20.

", "definition": "random(7..10#1)"}, "num": {"name": "num", "group": "Part b", "templateType": "anything", "description": "

Numerator of gap 0

", "definition": "k_coprime*{numif/gcda}"}, "m_coprime": {"name": "m_coprime", "group": "Part c", "templateType": "anything", "description": "", "definition": "m/gcd_lm"}, "aa": {"name": "aa", "group": "Part d", "templateType": "anything", "description": "", "definition": "random(1..6)"}, "gcda": {"name": "gcda", "group": "Part b", "templateType": "anything", "description": "

gcd of the numerator of the improper fraction

", "definition": "gcd({numif},{h_coprime})"}, "h_coprime": {"name": "h_coprime", "group": "Part b", "templateType": "anything", "description": "", "definition": "h/gcd_gh"}, "ee": {"name": "ee", "group": "Part d", "templateType": "anything", "description": "", "definition": "ddcc/4"}, "c": {"name": "c", "group": "Part a", "templateType": "anything", "description": "

Random number from 1 to 12.

", "definition": "random(3,5,7,11)"}, "b_coprime": {"name": "b_coprime", "group": "Part a", "templateType": "anything", "description": "", "definition": "b/gcd_bd"}, "l_coprime2": {"name": "l_coprime2", "group": "Part c", "templateType": "anything", "description": "", "definition": "l_coprime^2/gcd_lcmc"}, "k_coprime": {"name": "k_coprime", "group": "Part b", "templateType": "anything", "description": "", "definition": "k/gcd_kj"}, "j": {"name": "j", "group": "Part b", "templateType": "anything", "description": "

Random number between 1 and 20

", "definition": "Random(3,5,7,11,13,17)"}, "dd": {"name": "dd", "group": "Part d", "templateType": "anything", "description": "", "definition": "random(1..3)"}, "gcd_lcmc": {"name": "gcd_lcmc", "group": "Part c", "templateType": "anything", "description": "", "definition": "gcd((l_coprime)^2,(m_coprime)^2)"}, "m_coprime2": {"name": "m_coprime2", "group": "Part c", "templateType": "anything", "description": "", "definition": "m_coprime^2/gcd_lcmc"}, "gcd_lm": {"name": "gcd_lm", "group": "Part c", "templateType": "anything", "description": "", "definition": "gcd(l,m)"}, "ab": {"name": "ab", "group": "Part a", "templateType": "anything", "description": "

Variable a times variable b

", "definition": "a_coprime*b_coprime"}, "gcd_bd": {"name": "gcd_bd", "group": "Part a", "templateType": "anything", "description": "", "definition": "gcd(b,d)"}, "gcd2": {"name": "gcd2", "group": "Part b", "templateType": "anything", "description": "", "definition": "gcd(num,denom)"}}, "tags": ["improper fractions", "mixed numbers", "multiplication of fractions", "multiplying fractions", "squared fraction", "taxonomy"], "ungrouped_variables": [], "functions": {}, "preamble": {"js": "", "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}\n"}, "type": "question", "variable_groups": [{"variables": ["a", "b", "c", "d", "a_coprime", "b_coprime", "c_coprime", "d_coprime", "gcd_ac", "gcd_bd", "ab", "cd", "gcd"], "name": "Part a"}, {"variables": ["f", "g", "g_coprime", "h", "h_coprime", "gcd_gh", "k", "k_coprime", "j", "j_coprime", "gcd_kj", "fh", "numif", "num", "denom", "gcda", "gcdb", "gcd2"], "name": "Part b"}, {"variables": ["aa", "bb", "cc", "dd", "ddcc", "ee"], "name": "Part d"}, {"variables": ["l", "m", "gcd_lm", "l_coprime", "m_coprime", "gcd_lcmc", "l_coprime2", "m_coprime2"], "name": "Part c"}], "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"description": "

Several problems involving the multiplication of fractions, with increasingly difficult examples, including a mixed fraction and a squared fraction. The final part is a word problem. 

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"scripts": {}, "showCorrectAnswer": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "{ab}/{gcd}", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "{ab}/{gcd}", "showCorrectAnswer": true, "type": "numberentry", "marks": 1, "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "{cd}/{gcd}", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "{cd}/{gcd}", "showCorrectAnswer": true, "type": "numberentry", "marks": 1, "showFeedbackIcon": true}], "type": "gapfill", "prompt": "

$\\displaystyle\\frac{\\var{a_coprime}}{\\var{c_coprime}}\\times\\frac{\\var{b_coprime}}{\\var{d_coprime}}$ =  [[0]] [[1]]

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

$\\displaystyle\\simplify{{k}/{j}}\\times\\var{f}\\frac{\\var{g}}{\\var{h}}$ =  [[0]] [[1]]

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

$\\displaystyle\\bigg(\\frac{\\var{l_coprime}}{\\var{m_coprime}}\\bigg)^2= $ [[0]] [[1]]

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

Helen went on holiday in Europe. She spent $\\displaystyle\\frac{\\var{aa}}{7}$ of her time on holiday in Spain. Whilst in Spain, she spent $\\displaystyle\\frac{\\var{dd}}{4}$ of her time in Barcelona. 

\n

If her holiday lasted for $28$ days, how many days was she in Barcelona? 

\n

Helen was in Barcelona for [[0]] days.

", "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}]}, {"name": "Select the fraction not equivalent to the others - large denominators", "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/"}], "advice": "

To find the odd fraction out, reduce each fraction to lowest terms.

\n

\\begin{align}
\\frac{\\var{osix}}{\\var{psix}}=\\frac{\\var{o_coprime}}{\\var{p_coprime}}\\times\\frac{\\var{six}}{\\var{six}} \\\\[0.5em]
\\frac{\\var{oseven}}{\\var{pseven}}=\\frac{\\var{o_coprime}}{\\var{p_coprime}}\\times\\frac{\\var{seven}}{\\var{seven}} \\\\[0.5em]
\\frac{\\var{oeight}}{\\var{peight}}=\\displaystyle\\frac{\\var{o_coprime}}{\\var{p_coprime}}\\times\\frac{\\var{eight}}{\\var{eight}} \\\\[0.5em]
\\frac{\\var{onine}}{\\var{pnine}}=\\frac{\\var{o_coprime}}{\\var{p_coprime}}\\times\\frac{\\var{nine}}{\\var{nine}} \\\\[0.5em]
\\frac{\\var{oten}}{\\var{pten}} = \\frac{\\var{oten/gcd(oten,pten)}}{\\var{pten/gcd(oten,pten)}} \\times \\frac{\\var{gcd(oten,pten)}}{\\var{gcd(oten,pten)}}
\\end{align}

\n

The odd fraction out is $\\displaystyle\\frac{\\var{oten}}{\\var{pten}}$.

\n

", "statement": "", "variables": {"five": {"name": "five", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(1..7 except one except two except three except four)"}, "o": {"name": "o", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(1..7 except p except m)"}, "six": {"name": "six", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(1..10 except one except two except three except four except five)"}, "oten": {"name": "oten", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "o_coprime*ten+random(-6..6 except 0)"}, "pten": {"name": "pten", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "p_coprime*ten+random(-2..2 except 0)"}, "m": {"name": "m", "group": "Ungrouped variables", "templateType": "anything", "description": "

Random number between 1 and 10

", "definition": "random(1..7)"}, "pseven": {"name": "pseven", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "p_coprime*seven"}, "eight": {"name": "eight", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(6..15 except one except two except three except four except five except six except seven)"}, "nine": {"name": "nine", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(4..12 except one except two except three except four except five except six except seven except eight)"}, "three": {"name": "three", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(1..6 except one except two)"}, "psix": {"name": "psix", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "p_coprime*six"}, "ten": {"name": "ten", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(1..10 except one except two except three except four except five except six except seven except eight except nine)"}, "four": {"name": "four", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(5..20 except one except two except three)"}, "two": {"name": "two", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(2..15 except one)"}, "peight": {"name": "peight", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "p_coprime*eight"}, "o_coprime": {"name": "o_coprime", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "o/gcd_op"}, "osix": {"name": "osix", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "o_coprime*six"}, "pnine": {"name": "pnine", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "p_coprime*nine"}, "seven": {"name": "seven", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(1..6 except one except two except three except four except five except six)"}, "n": {"name": "n", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(7..15 except m)"}, "onine": {"name": "onine", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "o_coprime*nine"}, "one": {"name": "one", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(2..10)"}, "p_coprime": {"name": "p_coprime", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "p/gcd_op"}, "gcd_op": {"name": "gcd_op", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "gcd(o,p)"}, "oeight": {"name": "oeight", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "o_coprime*eight"}, "oseven": {"name": "oseven", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "o_coprime*seven"}, "p": {"name": "p", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(7..15 except n)"}}, "tags": ["equivalent fractions", "fractions", "Fractions", "taxonomy"], "ungrouped_variables": ["m", "n", "one", "two", "three", "four", "five", "o", "p", "gcd_op", "o_coprime", "p_coprime", "six", "osix", "psix", "seven", "oseven", "pseven", "eight", "oeight", "peight", "nine", "onine", "pnine", "ten", "oten", "pten"], "functions": {}, "preamble": {"js": "", "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}\n"}, "type": "question", "variable_groups": [], "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"description": "

Given five fractions, identify the odd fraction out. The denominators are mainly two or three digits long.

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"variableReplacements": [], "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "prompt": "

From the options below, select the fraction which is not equivalent to the others. 

", "matrix": [0, 0, 0, 0, "1"], "scripts": {}, "displayColumns": 0, "showCorrectAnswer": true, "distractors": ["", "", "", "", ""], "shuffleChoices": true, "marks": 0, "type": "1_n_2", "choices": ["

$\\displaystyle\\frac{\\var{osix}}{\\var{psix}}$

", "

$\\displaystyle\\frac{\\var{oseven}}{\\var{pseven}}$

", "

$\\displaystyle\\frac{\\var{oeight}}{\\var{peight}}$

", "

$\\displaystyle\\frac{\\var{onine}}{\\var{pnine}}$

", "

$\\displaystyle\\frac{\\var{oten}}{\\var{pten}}$

"], "showFeedbackIcon": true, "minMarks": 0}]}, {"name": "AJAY's copy of Expand brackets and collect like terms", "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": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}, {"name": "AJAY OTTA", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3976/"}], "tags": [], "metadata": {"description": "

Eight expressions, of increasing complexity. The student must simplify them by expanding brackets and collecting like terms.

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

For each expression below, collect like terms and expand brackets.

\n

The * symbol is required between algebraic symbols, e.g. $5ab^2$ should be written 5*a*b^2.

", "advice": "

When simplifying expressions, only terms of the same type or like terms can be added together.

\n

Algebraic symbols or letters can be added together provided that they are raised to the same power. For example, we can add $x^2+x^2=2x^2$, but we cannot collect both $x^2$ and $x$ into one term.

\n

a)

\n

\\[ 
\\begin{align}
\\var{c[0]}x+\\var{c[1]}x+\\var{c[2]}x&=(\\var{c[0]}+\\var{c[1]}+\\var{c[2]})x\\\\
&=\\simplify{({c[0]}+{c[1]}+{c[2]})}x
\\end{align}
\\]

\n

b)

\n

\\[ 
\\begin{align}
\\var{a[1]}x^2+\\var{a[2]}x^2+\\var{a[3]}x+\\var{a[4]}x +\\var{a[0]}&=(\\var{a[1]}+\\var{a[2]})x^2+(\\var{a[3]}+\\var{a[4]})x +\\var{a[0]}\\\\
&=\\simplify{({a[1]}+{a[2]})}x^2+\\simplify{({a[3]}+{a[4]})}x+\\var{a[0]}
\\end{align}
\\]

\n

c)

\n

\\[ 
\\begin{align}
\\var{b[0]}y^5+\\var{b[1]}y^5+\\var{b[2]}y^5+\\var{b[4]}y^5+\\var{b[3]}y^5&=(\\var{b[0]}+\\var{b[1]}+\\var{b[2]}+\\var{b[4]}+\\var{b[3]})y^5\\\\
&=\\simplify{({b[1]}+{b[2]}+{b[3]}+{b[4]}+{b[0]})}y^5
\\end{align}
\\]

\n

d)

\n

\\[ 
\\begin{align}
\\var{d[0]}ab+\\var{d[1]}abc+\\var{d[2]}a+\\var{d[3]}b+\\var{d[4]}c+\\var{d[5]}abc
&=(\\var{d[1]}+\\var{d[5]})abc+\\var{d[0]}ab+\\var{d[2]}a+\\var{d[3]}b+\\var{d[4]}c\\\\
&=\\simplify{{d[1]}+{d[5]}}abc+\\var{d[0]}ab+\\var{d[2]}a+\\var{d[3]}b+\\var{d[4]}c
\\end{align}
\\]

\n

e)

\n

\\[ 
\\begin{align}
\\var{f[0]}a^2b+\\var{f[1]}ab^2+\\var{f[2]}ab+\\var{f[3]}a^2b+\\var{f[4]}ab^2
&=(\\var{f[0]}+\\var{f[3]})a^2b+(\\var{f[1]}+\\var{f[4]})ab^2+\\var{f[2]}ab\\\\
&=\\simplify{{f[0]}+{f[3]}}a^2b+\\simplify{{f[1]}+{f[4]}}ab^2+\\var{f[2]}ab
\\end{align}
\\]

\n

f)

\n

\\[
\\begin{align}
\\var{g[0]}(\\var{g[1]}x+\\var{g[2]}y)+\\var{g[4]}x+\\var{g[5]}y
&=(\\var{g[0]}\\times \\var{g[1]}+\\var{g[4]})x+(\\var{g[0]} \\times\\var{g[2]}+\\var{g[5]})y\\\\
&=(\\simplify{{g[0]}*{g[1]}}+\\var{g[4]})x+(\\simplify{{g[0]}*{g[2]}}+\\var{g[5]})y\\\\
&=\\simplify{{g[0]}*{g[1]}+{g[4]}}x+\\simplify{{g[0]}*{g[2]}+{g[5]}}y
\\end{align}
\\]

\n

g)

\n

\\[ 
\\begin{align}
\\var{h[0]}x(\\var{h[1]}x+\\var{h[2]}z)+\\var{h[3]}x+\\var{h[6]}z+\\var{h[4]}x^2+\\var{h[5]}z^2
&=(\\simplify[]{{h[0]}{h[1]}}+\\var{h[4]})x^2+(\\simplify[]{{h[0]}{h[2]}})zx+\\var{h[3]}x+\\var{h[5]}z^2+\\var{h[6]}z\\\\
&=(\\simplify{{h[0]}{h[1]}}+\\var{h[4]})x^2+(\\simplify[]{{h[0]}{h[2]}})zx+\\var{h[3]}x+\\var{h[5]}z^2+\\var{h[6]}z\\\\
&=\\simplify{{h[0]}*{h[1]}+{h[4]}}x^2+\\simplify{{h[0]}*{h[2]}}zx+\\simplify{{h[3]}x+{h[5]}}z^2+\\var{h[6]}z
\\end{align}
\\]

\n

h)

\n

\\[ 
\\begin{align}
\\var{j[0]}(\\var{j[1]}x-\\var{j[2]}y)+\\var{j[3]}(\\var{j[4]}x-\\var{j[5]}y)+\\var{j[6]}(\\var{j[7]}x-\\var{j[8]}y)
&= (\\simplify[]{{j[0]}{j[1]}}+\\simplify[]{{j[3]}{j[4]}}+\\simplify[]{{j[6]}{j[7]}})x-(\\simplify[]{{j[0]}{j[2]}}+\\simplify[]{{j[3]}{j[5]}}+\\simplify[]{{j[6]}{j[8]}})y\\\\
&= (\\simplify{{j[0]}{j[1]}}+\\simplify{{j[3]}{j[4]}}+\\simplify{{j[6]}{j[7]}})x-(\\simplify{{j[0]}{j[2]}}+\\simplify{{j[3]}{j[5]}}+\\simplify{{j[6]}{j[8]}})y\\\\
&= \\simplify{({j[0]}*{j[1]}+{j[4]*j[3]}+{j[6]}*{j[7]})x}-\\simplify{({j[0]}*{j[2]}+{j[5]}{j[3]}+{j[6]}*{j[8]})y}
\\end{align}
\\]

\n

", "rulesets": {}, "variables": {"c": {"name": "c", "group": "Part a", "definition": "repeat(random(2..10),5)", "description": "", "templateType": "anything"}, "c1": {"name": "c1", "group": "B group", "definition": "random(2..5)*2", "description": "", "templateType": "anything"}, "b1": {"name": "b1", "group": "B group", "definition": "random(2..10 except a1)", "description": "", "templateType": "anything"}, "d": {"name": "d", "group": "Part a", "definition": "repeat(random(2..33),6)", "description": "", "templateType": "anything"}, "f": {"name": "f", "group": "Part a", "definition": "repeat(random(2..20),7)", "description": "", "templateType": "anything"}, "j": {"name": "j", "group": "Part a", "definition": "repeat(random(2..20),9)", "description": "", "templateType": "anything"}, "h": {"name": "h", "group": "Part a", "definition": "repeat(random(2..20),7)", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "B group", "definition": "random(5..10)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Part a", "definition": "repeat(random(5..15),5)", "description": "

random variables for part 1

", "templateType": "anything"}, "b": {"name": "b", "group": "Part a", "definition": "repeat(random(2..10),5)", "description": "", "templateType": "anything"}, "g": {"name": "g", "group": "Part a", "definition": "repeat(random(2..15),7)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "B group", "variables": ["a1", "b1", "c1"]}, {"name": "Part a", "variables": ["a", "b", "c", "d", "f", "g", "h", "j"]}], "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": "

$\\var{c[0]}x+\\var{c[1]}x+\\var{c[2]}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": "({c[1]}+{c[0]}+{c[2]})x", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "maxlength": {"length": "0", "partialCredit": 0, "message": "

You must collect like terms to fully simplify.

"}, "mustmatchpattern": {"pattern": "$n*x", "partialCredit": 0, "message": "You haven't simplified: you still have two or more like terms that should be collected together.", "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": "


$\\var{a[1]}x^2+\\var{a[2]}x^2+\\var{a[3]}x+\\var{a[4]}x +\\var{a[0]}=$ [[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^2+({a[3]}+{a[4]})x+{a[0]}", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "$n*x^2 + $n*x + $n", "partialCredit": 0, "message": "You haven't simplified: you still have two or more like terms that should be collected together.", "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": "

$\\var{b[0]}y^5+\\var{b[1]}y^5+\\var{b[2]}y^5+\\var{b[4]}y^5+\\var{b[3]}y^5=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "({b[1]}+{b[2]}+{b[3]}+{b[4]}+{b[0]})y^5", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "maxlength": {"length": "0", "partialCredit": 0, "message": "

You must condense your answer to fully simplify.

"}, "mustmatchpattern": {"pattern": "$n*y^5", "partialCredit": 0, "message": "You haven't simplified: you still have two or more like terms that should be collected together.", "nameToCompare": ""}, "valuegenerators": [{"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": "

$\\var{d[0]}ab+\\var{d[1]}abc+\\var{d[2]}a+\\var{d[3]}b+\\var{d[4]}c+\\var{d[5]}abc=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{d[0]}a*b+{d[1]+d[5]}*a*b*c+{d[2]}a+{d[3]}b+{d[4]}c", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "maxlength": {"length": "0", "partialCredit": 0, "message": "

You must condense your answer to fully simplify. 

"}, "mustmatchpattern": {"pattern": "$n*a*b*c + $n*a*b + $n*a + $n*b + $n*c", "partialCredit": 0, "message": "You haven't simplified: you still have two or more like terms that should be collected together.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}, {"name": "b", "value": ""}, {"name": "c", "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": "

$\\var{f[0]}a^2b+\\var{f[1]}ab^2+\\var{f[2]}ab+\\var{f[3]}a^2b+\\var{f[4]}ab^2=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "({f[0]}+{f[3]})a^2b+({f[1]}+{f[4]})a*b^2+({f[2]})a*b", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "maxlength": {"length": "0", "partialCredit": 0, "message": "

You must condense your answer to fully simplify. 

"}, "mustmatchpattern": {"pattern": "$n*a^2*b + $n*a*b^2 + $n*a*b", "partialCredit": 0, "message": "You haven't simplified: you still have two or more like terms that should be collected together.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}, {"name": "b", "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": "

$\\var{g[0]}(\\var{g[1]}x+\\var{g[2]}y)+\\var{g[4]}x+\\var{g[5]}y=$ [[0]]

\n

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "({g[0]}{g[1]}+{g[4]})x+({g[0]}{g[2]}+{g[5]})y", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "maxlength": {"length": "0", "partialCredit": 0, "message": "

You must condense your answer to fully simplify. *'s are not needed to indicate multiplication here.

"}, "mustmatchpattern": {"pattern": "$n*x+$n*y", "partialCredit": 0, "message": "You haven't simplified: you still have two or more like terms that should be collected together.", "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": "

$\\var{h[0]}x(\\var{h[1]}x+\\var{h[2]}z)+\\var{h[3]}x+\\var{h[6]}z+\\var{h[4]}x^2+\\var{h[5]}z^2=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "({h[0]}{h[1]}+{h[4]})x^2+({h[0]}{h[2]})z*x+{h[3]}x+{h[5]}z^2+{h[6]}z", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "maxlength": {"length": "0", "partialCredit": 0, "message": "

You must condense your answer to fully simplify. 

"}, "musthave": {"strings": ["*"], "showStrings": false, "partialCredit": 0, "message": ""}, "notallowed": {"strings": ["(", ")"], "showStrings": true, "partialCredit": 0, "message": "

9You should not have brackets in your answer.

"}, "mustmatchpattern": {"pattern": "$n*x*z + $n*x^2 + $n*x + $n*z + $n*z^2", "partialCredit": 0, "message": "You haven't simplified: you still have two or more like terms that should be collected together.", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}, {"name": "z", "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": "

$\\var{j[0]}(\\var{j[1]}x-\\var{j[2]}y)+\\var{j[3]}(\\var{j[4]}x-\\var{j[5]}y)+\\var{j[6]}(\\var{j[7]}x-\\var{j[8]}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": "({j[0]}{j[1]}+{j[4]}{j[3]}+{j[6]}{j[7]})x-({j[0]}{j[2]}+{j[5]}{j[3]}+{j[6]}{j[8]})y", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "maxlength": {"length": "0", "partialCredit": 0, "message": "

You must condense your answer to fully simplify. 

"}, "mustmatchpattern": {"pattern": "$n*x + `+-$n*y", "partialCredit": 0, "message": "You haven't simplified: you still have two or more like terms that should be collected together.", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "sortAnswers": false}], "type": "question"}, {"name": "Basic trigonometry", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "AJAY OTTA", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3976/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n

Fill in the gap.

", "advice": "
\n
\n
\n

if we write $\\boxed{\\var{a}=r\\sin\\alpha}$  and  $\\boxed{\\var{b}=r\\cos\\alpha}$ for some $r$ and $\\alpha$ then we have $(\\var{a})\\cos\\theta+(\\var{b})\\sin\\theta=(r\\sin\\alpha)\\cos\\theta+(r\\cos\\alpha)\\sin\\theta=r\\sin(\\alpha+\\theta)$ . Then the maximum and minimum value will be $r$  and $-r$ since $-1\\leq\\sin(\\alpha+\\theta)\\leq 1$

\n

To find $r$ we do the following:  $r^2\\sin^2\\alpha=(\\var{a})^2$ and $r^2\\cos^2\\alpha=(\\var{b})^2 \\implies r^2\\sin^2\\alpha+r^2\\cos^2\\alpha=(\\var{a})^2+(\\var{b})^2\\implies r^2(\\sin^2\\alpha+\\cos^2\\alpha)=(\\var{a})^2+(\\var{b})^2\\implies r^2=(\\var{a})^2+(\\var{b})^2\\\\ \\implies r=\\sqrt{({\\var{a})^2+(\\var{b})^2}}=\\var{c}$ 

", "rulesets": {}, "variables": {"triplet": {"name": "triplet", "group": "Ungrouped variables", "definition": "random([[3,4,5],[5,12,13],[7,24,25],[8,15,17],[9,40,41],[11,60,61],[12,35,37],[16,63,65],[20,21,29],[20,99,101]])\n", "description": "
\n

", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random([-1,1])*triplet[0]", "description": "
\n
\n

", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random([-1,1])*triplet[1]", "description": "
\n

", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "triplet[2]", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["triplet", "a", "b", "c"], "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": "
\n
\n
\n
\n

The maximum of $(\\var{a})\\cos\\theta +(\\var{b})\\sin\\theta$=[[0]] 

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "triplet[2]", "maxValue": "triplet[2]", "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, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "
\n
\n

The minimum of $(\\var{a})\\cos\\theta +(\\var{b})\\sin\\theta$=[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "-triplet[2]", "maxValue": "-triplet[2]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "type": "question"}, {"name": "AJAY's copy of Algebra: Solving quadratics by completing the square", "extensions": [], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

\n

You can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by {settings['separator']}.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentThe separate items in the student's answer

", "definition": "let(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)"}, {"name": "expected_numbers", "description": "", "definition": "let(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)"}, {"name": "valid_numbers", "description": "

Is every number in the student's list valid?

", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "

Are the student's answers in ascending order?

", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "

Is each number in the expected answer present in the student's list the correct number of times?

", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentHas every number been included the right number of times?

", "definition": "all(included)"}, {"name": "no_extras", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "

Should the answer be considered as a set, so the number of times an element occurs doesn't matter?

", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "

Numbers included in the student's answer that are not in the expected list.

", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "AJAY OTTA", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3976/"}], "tags": [], "metadata": {"description": "

A few quadratic equations are given, to be solved by completing the square. The number of solutions is randomised.

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

Solve these equations by completing the square. If there is more than one solution, enter all the solutions separated by a comma.

\n

------------------------------------

", "advice": "

See 5.1 and 5.2 for examples and background on solving by completing the square

\n

See 3.3 for examples of completing the square

", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "vector([random(1..5)]+[random(-1..-5)]+[random(-1..-5)]+[random(-1..-5)]+[random(1..5)])", "description": "", "templateType": "anything"}, "xmax": {"name": "xmax", "group": "Ungrouped variables", "definition": "vector([-a[0]]+[-a[0]]+[-a[0]]+[-a[0]]+[-a[1]]+[-a[1]]+[-a[1]]+[-a[1]])+shift", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "vector([random(-10..25)] + [random(-10..25)] + [random(-10..25)] + [random(-10..25)] + [random(-10..25)] )", "description": "", "templateType": "anything"}, "xmin": {"name": "xmin", "group": "Ungrouped variables", "definition": "vector([-a[0]]+[-a[0]]+[-a[0]]+[-a[0]]+[-a[1]]+[-a[1]]+[-a[1]]+[-a[1]])-shift", "description": "", "templateType": "anything"}, "fx": {"name": "fx", "group": "Ungrouped variables", "definition": "vector([(xmax[0]+a[0])^2+b[0]]+[(xmax[1]+a[0])^2+b[0]]+[(xmax[2]+a[0])^2+b[0]]+[(xmax[3]+a[0])^2+b[0]]+[(xmax[4]+a[1])^2+b[1]]+[(xmax[5]+a[1])^2+b[1]]+[(xmax[6]+a[1])^2+b[1]]+[(xmax[7]+a[1])^2+b[1]])", "description": "", "templateType": "anything"}, "shift": {"name": "shift", "group": "Ungrouped variables", "definition": "vector(shuffle(1..9#4)+[0]+shuffle(1..9#4)+[0])", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "shift", "xmin", "xmax", "fx"], "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": "

Complete the square on $\\simplify{x^2+{2*a[0]}x+ {a[0]^2+b[0]}}$ [[0]]

\n

Hence solve $\\simplify{x^2+{2*a[0]}x+ {a[0]^2+b[0]}} = \\var{fx[0]}$ [[1]]

\n

Also solve $\\simplify{x^2+{2*a[0]}x+ {a[0]^2+b[0]}} = \\var{fx[3]}$ [[2]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "(x+{a[0]})^2+{b[0]}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "musthave": {"strings": ["(", ")", "^"], "showStrings": false, "partialCredit": 0, "message": "

please input in the form $(x+a)^2+b$

"}, "notallowed": {"strings": ["x^2", "x*x", "x x", "x(", "x*("], "showStrings": false, "partialCredit": 0, "message": "

Input your answer in the form $(x+a)^2+b$.

"}, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "settings": {"correctAnswer": "[xmin[0],xmax[0]]", "allowFractions": true, "correctAnswerFractions": true}}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "settings": {"correctAnswer": "[xmin[3]]", "allowFractions": true, "correctAnswerFractions": true}}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Complete the square on $\\simplify{x^2+{2*a[1]}x+ {a[1]^2+b[1]}}$ [[0]]

\n

Hence solve $\\simplify{x^2+{2*a[1]}x+ {a[1]^2+b[1]}} = \\var{fx[4]}$ [[1]]

\n

Also solve $\\simplify{x^2+{2*a[1]}x+ {a[1]^2+b[1]}} = \\var{fx[5]}$ [[2]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "(x+{a[1]})^2+{b[1]}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "musthave": {"strings": ["(", ")", "^"], "showStrings": false, "partialCredit": 0, "message": "

please input in the form $(x+a)^2+b$

"}, "notallowed": {"strings": ["x^2", "x*x", "x x", "x(", "x*("], "showStrings": false, "partialCredit": 0, "message": "

Input your answer in the form $(x+a)^2+b$.

"}, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "settings": {"correctAnswer": "[xmin[4],xmax[4]]", "allowFractions": false, "correctAnswerFractions": false}}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "settings": {"correctAnswer": "[xmin[5],xmax[5]]", "allowFractions": false, "correctAnswerFractions": false}}], "sortAnswers": false}], "type": "question"}]}, {"name": "FirstGroup", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": [], "questions": []}, {"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": [""], "questions": [{"name": "Exact values for sin, cos, tan (-1080 to 1080, degrees) ", "extensions": [], "custom_part_types": [], "resources": [["question-resources/exact_values.svg", "/srv/numbas/media/question-resources/exact_values.svg"], ["question-resources/unit_circle_working.svg", "/srv/numbas/media/question-resources/unit_circle_working.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "tags": [], "metadata": {"description": "

multiple choice testing sin, cos, tan of angles that are negative or greater than 360 degrees that result in nice exact values. 

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

Often we prefer to work with exact values rather than approximations from a calculator. In this question we require you input your answer without decimals and without entering the words sin, cos or tan. For example to input the exact value of $\\sin(60^\\circ)$, which is $\\dfrac{\\sqrt{3}}{2}$, you would input sqrt(3)/2

", "advice": "

By drawing the following triangles we can determine the exact values of $\\sin$, $\\cos$ and $\\tan$ (and their reciprocals $\\csc$, $\\sec$, $\\cot$) for the angles $30^\\circ$, $45^\\circ$ and $60^\\circ$.

\n


\n

Alternatively, one can memorise the following table: 

\n

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$30^\\circ$$45^\\circ$$60^\\circ$
 
$\\sin$$\\dfrac{1}{2}$$\\dfrac{1}{\\sqrt{2}}$$\\dfrac{\\sqrt{3}}{2}$
 
$\\cos$$\\dfrac{\\sqrt{3}}{2}$$\\dfrac{1}{\\sqrt{2}}$$\\dfrac{1}{2}$
 
$\\tan$$\\dfrac{1}{\\sqrt{3}}$$1$$\\sqrt{3}$
\n

\n

That combined with the unit circle definitions:

\n\n

\n

and some understanding of congruent triangles:

\n
\n

\n

allows us to work out $\\sin$, $\\cos$ and $\\tan$ for certain angles regardless of what quadrant the point is in. Because whatever angle we are asked about, we can always use the triangle in the first quadrant to determine the side lengths and then consider the signs of the coordinates separately.

\n

\n

For example, to determine $\\sin(210^\\circ)$, $\\cos(210^\\circ)$ and $\\tan(210^\\circ)$ we first draw the following:

\n

\n

From this diagram, we can see that $\\cos(210^\\circ)=-\\cos(30^\\circ)$, and $\\sin(210^\\circ)=-\\sin(30^\\circ)$ since the triangles are congruent and we are in the 3rd quadrant where both the $x$ and $y$ values (and hence the $\\cos$ and $\\sin$ values) are negative. 

\n

But given we know these exact values, we can conclude \\[\\cos(210^\\circ)=-\\cos(30^\\circ)=-\\dfrac{\\sqrt{3}}{2},\\] \\[\\sin(210^\\circ)=-\\sin(30^\\circ)=-\\dfrac{1}{2},\\] and finally \\[\\tan(210^\\circ)=\\dfrac{\\sin(210^\\circ)}{\\cos(210^\\circ)}=\\dfrac{-\\frac{1}{2}}{-\\frac{\\sqrt{3}}{2}}=\\dfrac{1}{\\sqrt{3}}.\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"phi": {"name": "phi", "group": "Ungrouped variables", "definition": "random(0,30,45,60,90,120,135,150,180,210,225,240,270,300,315,330)", "description": "", "templateType": "anything", "can_override": false}, "theta": {"name": "theta", "group": "Ungrouped variables", "definition": "phi+rev", "description": "", "templateType": "anything", "can_override": false}, "rev": {"name": "rev", "group": "Ungrouped variables", "definition": "random(360,720,-360,-720,-1080)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["theta", "phi", "rev"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The exact value of $\\sin(\\var{theta}^\\circ)$ is [[0]].

\n

The exact value of $\\cos(\\var{theta}^\\circ)$ is [[1]].

\n

If $\\tan(\\var{theta}^\\circ)$ is defined, what is its exact value? If it isn't, then enter infinity (even though it doesn't equal that).   [[2]].

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "sin({phi}/180*pi)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": [".", "sin", "cos", "tan", "cosec", "sec", "cot"], "showStrings": true, "partialCredit": 0, "message": ""}, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "cos({phi}/180*pi)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": [".", "sin", "cos", "tan", "cosec", "sec", "cot"], "showStrings": true, "partialCredit": 0, "message": ""}, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{if(phi=90 or phi=270,infinity,tan({phi}*pi/180))}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": [".", "sin", "cos", "tan", "cosec", "sec", "cot"], "showStrings": true, "partialCredit": 0, "message": ""}, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}], "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "

All the questions are from your school course. Have a go at all. Find out your grey areas.

", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": [], "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "inreview"}, "type": "exam", "contributors": [{"name": "AJAY OTTA", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3976/"}], "extensions": ["stats"], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

\n

You can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by {settings['separator']}.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentThe separate items in the student's answer

", "definition": "let(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)"}, {"name": "expected_numbers", "description": "", "definition": "let(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)"}, {"name": "valid_numbers", "description": "

Is every number in the student's list valid?

", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "

Are the student's answers in ascending order?

", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "

Is each number in the expected answer present in the student's list the correct number of times?

", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentHas every number been included the right number of times?

", "definition": "all(included)"}, {"name": "no_extras", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "

Should the answer be considered as a set, so the number of times an element occurs doesn't matter?

", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "

Numbers included in the student's answer that are not in the expected list.

", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [["question-resources/exact_values.svg", "/srv/numbas/media/question-resources/exact_values.svg"], ["question-resources/unit_circle_working.svg", "/srv/numbas/media/question-resources/unit_circle_working.svg"]]}