// Numbas version: finer_feedback_settings {"metadata": {"licence": "None specified", "description": ""}, "name": "MATH6005 Assessment2", "timing": {"timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}, "allowPause": true}, "navigation": {"showfrontpage": true, "allowsteps": true, "reverse": true, "showresultspage": "oncompletion", "onleave": {"action": "none", "message": ""}, "allowregen": false, "browse": true, "preventleave": true, "startpassword": ""}, "showQuestionGroupNames": false, "duration": 0, "feedback": {"showanswerstate": false, "showtotalmark": true, "allowrevealanswer": false, "intro": "", "showactualmark": false, "feedbackmessages": [], "advicethreshold": 0, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "oncompletion", "showactualmarkwhen": "oncompletion", "showtotalmarkwhen": "always", "showanswerstatewhen": "oncompletion", "showadvicewhen": "never"}, "showstudentname": true, "percentPass": 0, "question_groups": [{"pickQuestions": 1, "name": "Group", "pickingStrategy": "all-shuffled", "questions": [{"name": "MATH6005 Assessment 2_Q1of6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Katy Dobson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/854/"}, {"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}, {"name": "Paul Emanuel", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2551/"}], "tags": [], "ungrouped_variables": ["b4", "q", "s3", "s2", "s1", "s5", "s4", "ssquares", "v1", "v2", "a4", "a", "c", "b", "d", "g", "f", "m", "n", "ssquaresb", "ssquaresa", "v"], "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "variables": {"f": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "f", "definition": "random(2..9)"}, "g": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "g", "definition": "s1*random(2..9)"}, "s4": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s4", "definition": "random(1,-1)"}, "q": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "q", "definition": "M+N"}, "a": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "a", "definition": "s1*random(2..9)"}, "a4": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "a4", "definition": "random(3..9)"}, "v2": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "v2", "definition": "vector(c,d,f)"}, "s1": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s1", "definition": "random(1,-1)"}, "ssquaresb": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "ssquaresb", "definition": "(c)^2+(d)^2+(f)^2"}, "b4": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "b4", "definition": "-random(3..9)"}, "v": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "v", "definition": "v1+v2"}, "s5": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s5", "definition": "random(1,-1)"}, "b": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "b", "definition": "s2*random(2..9)"}, "ssquaresa": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "ssquaresa", "definition": "(a)^2+(b)^2+(g)^2"}, "s2": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s2", "definition": "random(1,-1)"}, "n": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "n", "definition": "matrix([a,b],[c,d])"}, "s3": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s3", "definition": "random(1,-1)"}, "ssquares": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "ssquares", "definition": "(a+c)^2+(b+d)^2+(f+g)^2"}, "v1": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "v1", "definition": "vector(a,b,g)"}, "d": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "d", "definition": "s4*random(2..9)"}, "c": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "c", "definition": "s3*random(2..9)"}, "m": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "m", "definition": "matrix([a,b],[c,d])"}}, "preamble": {"css": "", "js": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Elementary operations on vectors; sum, modulus, unit vector, scalar multiple. 

"}, "parts": [{"showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "prompt": "

Calculate $\\mathbf{v}+\\mathbf{w} = $ [[0]]

", "marks": 0, "sortAnswers": false, "gaps": [{"showCorrectAnswer": true, "correctAnswer": "v", "marks": "0.25", "numRows": "3", "correctAnswerFractions": false, "type": "matrix", "extendBaseMarkingAlgorithm": true, "scripts": {}, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "unitTests": [], "allowResize": false, "customMarkingAlgorithm": "", "variableReplacements": [], "numColumns": 1, "markPerCell": false, "allowFractions": false}], "type": "gapfill", "scripts": {}, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": []}, {"showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "prompt": "

Calculate $4\\mathbf{v}-2\\mathbf{w} = $[[0]]

", "marks": 0, "sortAnswers": false, "gaps": [{"showCorrectAnswer": true, "correctAnswer": "4*v1 - 2*v2", "marks": "0.25", "numRows": "3", "correctAnswerFractions": false, "type": "matrix", "extendBaseMarkingAlgorithm": true, "scripts": {}, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "unitTests": [], "allowResize": false, "customMarkingAlgorithm": "", "variableReplacements": [], "numColumns": 1, "markPerCell": false, "allowFractions": false}], "type": "gapfill", "scripts": {}, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": []}], "advice": "

a)

\n

\\[\\boldsymbol{v}+\\boldsymbol{w} = \\var{vector(a,b,g)} + \\var{vector(c,d,f)} = \\var{vector(a+c,b+d,g+f)} \\]

\n

b)

\n

In general for a vector $\\boldsymbol{x}= \\begin{pmatrix}x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix}$, we have $\\lVert \\boldsymbol{x} \\rVert = \\sqrt{x_1^2+x_2^2+x_3^2}$.

\n

Hence:

\n

\\begin{align}
\\lVert \\boldsymbol{v} \\rVert &= \\sqrt{\\var{a^2}+\\var{b^2}+\\var{g^2}} = \\simplify[all]{ sqrt({a^2+b^2+g^2})} \\\\
\\lVert \\boldsymbol{w} \\rVert &= \\sqrt{\\var{c^2}+\\var{d^2}+\\var{f^2}} = \\simplify[all]{ sqrt({c^2+d^2+f^2})} \\\\
\\lVert \\boldsymbol{v+w} \\rVert &= \\sqrt{\\var{(a+c)^2}+\\var{(b+d)^2}+\\var{(g+f)^2}} = \\simplify[all]{ sqrt({(a+c)^2+(b+d)^2+(f+g)^2})}
\\end{align}

\n

c)

\n

Given a vector $\\boldsymbol{x}= \\begin{pmatrix} x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix}$, the unit vector parallel to $\\boldsymbol{x}$ is given by:

\n

\\[ \\boldsymbol{u_x} = \\frac{1}{\\lVert \\boldsymbol{x} \\rVert} \\begin{pmatrix} x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix} = \\begin{pmatrix} \\frac{x_1}{\\lVert \\boldsymbol{x} \\rVert} \\\\ \\frac{x_2}{\\lVert \\boldsymbol{x} \\rVert} \\\\ \\frac{x_3}{\\lVert \\boldsymbol{x} \\rVert} \\end{pmatrix} \\]

\n

For this example we have $\\lVert \\boldsymbol{v+w} \\rVert =\\simplify[std]{sqrt({(a+c)^2+(b+d)^2+(f+g)^2})}$, hence:

\n

\\begin{align}
&&\\boldsymbol{z} = \\boldsymbol{v} + \\boldsymbol{w} &= \\begin{pmatrix} \\var{a+c} \\\\ \\var{b+d} \\\\ \\var{g+f} \\end{pmatrix} \\\\
\\implies && \\boldsymbol{u_z} &= \\frac{1}{\\sqrt{\\var{ssquares}}} \\begin{pmatrix} \\var{a+c} \\\\ \\var{b+d} \\\\ \\var{g+f} \\end{pmatrix} \\\\[1em] 
&& &= \\begin{pmatrix} \\simplify[std]{{a+c}/sqrt({ssquares})} \\\\ \\simplify[std]{{b+d}/sqrt({ssquares})} \\\\ \\simplify[std]{{g+f}/sqrt({ssquares})} \\end{pmatrix}
\\end{align}

\n

d)

\n

\\begin{align}
\\var{a4}\\boldsymbol{v} &= \\simplify{vector({a4}*{a}, {a4}*{b}, {a4}*{g})} \\\\[1em]
&= \\var{a4*vector(a,b,g)}
\\end{align}

\n

\\begin{align}
\\var{-b4}\\boldsymbol{v} &= \\simplify{vector({-b4}*{c}, {-b4}*{d}, {-b4}*{f})} \\\\[1em]
&= \\var{-b4*vector(c,d,f)}
\\end{align}

\n

e)

\n

Using the information above, the unit vector parallel to $\\boldsymbol{v}$ is:

\n

\\[ \\boldsymbol{u_v} = \\begin{pmatrix} \\simplify[std]{{a}/sqrt({ssquaresA})} \\\\ \\simplify[std]{{b}/sqrt({ssquaresA})} \\\\ \\simplify[std]{{g}/sqrt({ssquaresA})} \\end{pmatrix} \\]

\n

and the unit vector anti-parallel to $\\boldsymbol{w}$ is:

\n

\\[ -\\boldsymbol{u_w} = \\begin{pmatrix} \\simplify[std]{{-c}/sqrt({ssquaresB})} \\\\ \\simplify[std]{{-d}/sqrt({ssquaresB})} \\\\ \\simplify[std]{{-f}/sqrt({ssquaresB})} \\end{pmatrix} \\]

", "statement": "

You are given the vectors

\n

\\begin{align}
\\mathbf{v} & =\\simplify[std]{vector({a},{b},{g})}, &
\\mathbf{w} &= \\simplify[std]{vector({c},{d},{f})}\\qquad \\in{\\mathbb R}^3.
\\end{align}

\n

Enter your answers to the following questions exactly, using the function sqrt(x) if necessary.

", "functions": {}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "type": "question"}, {"name": "MATH6005 Assessment 2_Q2of6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Katy Dobson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/854/"}, {"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}, {"name": "Paul Emanuel", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2551/"}], "functions": {}, "metadata": {"description": "

Elementary operations on vectors; sum, modulus, unit vector, scalar multiple. 

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

a)

\n

\\[\\boldsymbol{v}+\\boldsymbol{w} = \\var{vector(a,b,g)} + \\var{vector(c,d,f)} = \\var{vector(a+c,b+d,g+f)} \\]

\n

b)

\n

In general for a vector $\\boldsymbol{x}= \\begin{pmatrix}x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix}$, we have $\\lVert \\boldsymbol{x} \\rVert = \\sqrt{x_1^2+x_2^2+x_3^2}$.

\n

Hence:

\n

\\begin{align}
\\lVert \\boldsymbol{v} \\rVert &= \\sqrt{\\var{a^2}+\\var{b^2}+\\var{g^2}} = \\simplify[all]{ sqrt({a^2+b^2+g^2})} \\\\
\\lVert \\boldsymbol{w} \\rVert &= \\sqrt{\\var{c^2}+\\var{d^2}+\\var{f^2}} = \\simplify[all]{ sqrt({c^2+d^2+f^2})} \\\\
\\lVert \\boldsymbol{v+w} \\rVert &= \\sqrt{\\var{(a+c)^2}+\\var{(b+d)^2}+\\var{(g+f)^2}} = \\simplify[all]{ sqrt({(a+c)^2+(b+d)^2+(f+g)^2})}
\\end{align}

\n

c)

\n

Given a vector $\\boldsymbol{x}= \\begin{pmatrix} x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix}$, the unit vector parallel to $\\boldsymbol{x}$ is given by:

\n

\\[ \\boldsymbol{u_x} = \\frac{1}{\\lVert \\boldsymbol{x} \\rVert} \\begin{pmatrix} x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix} = \\begin{pmatrix} \\frac{x_1}{\\lVert \\boldsymbol{x} \\rVert} \\\\ \\frac{x_2}{\\lVert \\boldsymbol{x} \\rVert} \\\\ \\frac{x_3}{\\lVert \\boldsymbol{x} \\rVert} \\end{pmatrix} \\]

\n

For this example we have $\\lVert \\boldsymbol{v+w} \\rVert =\\simplify[std]{sqrt({(a+c)^2+(b+d)^2+(f+g)^2})}$, hence:

\n

\\begin{align}
&&\\boldsymbol{z} = \\boldsymbol{v} + \\boldsymbol{w} &= \\begin{pmatrix} \\var{a+c} \\\\ \\var{b+d} \\\\ \\var{g+f} \\end{pmatrix} \\\\
\\implies && \\boldsymbol{u_z} &= \\frac{1}{\\sqrt{\\var{ssquares}}} \\begin{pmatrix} \\var{a+c} \\\\ \\var{b+d} \\\\ \\var{g+f} \\end{pmatrix} \\\\[1em] 
&& &= \\begin{pmatrix} \\simplify[std]{{a+c}/sqrt({ssquares})} \\\\ \\simplify[std]{{b+d}/sqrt({ssquares})} \\\\ \\simplify[std]{{g+f}/sqrt({ssquares})} \\end{pmatrix}
\\end{align}

\n

d)

\n

\\begin{align}
\\var{a4}\\boldsymbol{v} &= \\simplify{vector({a4}*{a}, {a4}*{b}, {a4}*{g})} \\\\[1em]
&= \\var{a4*vector(a,b,g)}
\\end{align}

\n

\\begin{align}
\\var{-b4}\\boldsymbol{v} &= \\simplify{vector({-b4}*{c}, {-b4}*{d}, {-b4}*{f})} \\\\[1em]
&= \\var{-b4*vector(c,d,f)}
\\end{align}

\n

e)

\n

Using the information above, the unit vector parallel to $\\boldsymbol{v}$ is:

\n

\\[ \\boldsymbol{u_v} = \\begin{pmatrix} \\simplify[std]{{a}/sqrt({ssquaresA})} \\\\ \\simplify[std]{{b}/sqrt({ssquaresA})} \\\\ \\simplify[std]{{g}/sqrt({ssquaresA})} \\end{pmatrix} \\]

\n

and the unit vector anti-parallel to $\\boldsymbol{w}$ is:

\n

\\[ -\\boldsymbol{u_w} = \\begin{pmatrix} \\simplify[std]{{-c}/sqrt({ssquaresB})} \\\\ \\simplify[std]{{-d}/sqrt({ssquaresB})} \\\\ \\simplify[std]{{-f}/sqrt({ssquaresB})} \\end{pmatrix} \\]

", "statement": "

You are given the vectors

\n

\\begin{align}
\\mathbf{v} & =\\simplify[std]{vector({a},{b},{g})}, &
\\mathbf{w} &= \\simplify[std]{vector({c},{d},{f})}\\qquad \\in{\\mathbb R}^3.
\\end{align}

\n

Enter your answers to the following questions exactly, using the function sqrt(x) if necessary.

", "variable_groups": [], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "tags": [], "variables": {"ssquaresa": {"name": "ssquaresa", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "(a)^2+(b)^2+(g)^2"}, "v2": {"name": "v2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "vector(c,d,f)"}, "a": {"name": "a", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "s1*random(2..9)"}, "d": {"name": "d", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "s4*random(2..9)"}, "ssquaresb": {"name": "ssquaresb", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "(c)^2+(d)^2+(f)^2"}, "s4": {"name": "s4", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "a4": {"name": "a4", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..9)"}, "v1": {"name": "v1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "vector(a,b,g)"}, "n": {"name": "n", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([a,b],[c,d])"}, "v": {"name": "v", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "v1+v2"}, "m": {"name": "m", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([a,b],[c,d])"}, "b4": {"name": "b4", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "-random(3..9)"}, "s2": {"name": "s2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "c": {"name": "c", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "s3*random(2..9)"}, "s3": {"name": "s3", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "s5": {"name": "s5", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "f": {"name": "f", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..9)"}, "g": {"name": "g", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "s1*random(2..9)"}, "b": {"name": "b", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "s2*random(2..9)"}, "s1": {"name": "s1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "ssquares": {"name": "ssquares", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "(a+c)^2+(b+d)^2+(f+g)^2"}, "q": {"name": "q", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "M+N"}}, "parts": [{"prompt": "

Calculate the following.

\n

$\\vert \\mathbf{v} \\vert=$ [[0]]

\n

\n

", "adaptiveMarkingPenalty": 0, "scripts": {}, "marks": 0, "customName": "", "useCustomName": false, "sortAnswers": false, "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "gaps": [{"adaptiveMarkingPenalty": 0, "scripts": {}, "variableReplacements": [], "checkingType": "absdiff", "customMarkingAlgorithm": "", "valuegenerators": [], "answer": "sqrt({a^2+b^2+g^2})", "showCorrectAnswer": true, "checkingAccuracy": 0.001, "checkVariableNames": false, "marks": "0.25", "customName": "", "useCustomName": false, "unitTests": [], "answerSimplification": "std", "variableReplacementStrategy": "originalfirst", "showPreview": true, "failureRate": 1, "type": "jme", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "vsetRange": [0, 1], "vsetRangePoints": 5}], "variableReplacementStrategy": "originalfirst", "type": "gapfill", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "showCorrectAnswer": true}, {"prompt": "

Let $\\mathbf{z}=\\mathbf{v}+\\mathbf{w}$.

\n

Calculate the unit vector $\\mathbf{\\hat{z}}$ in the direction of $\\mathbf{z}$. Write $\\mathbf{\\hat{z}}$ as a row vector.

\n

$\\mathbf{\\hat{z}}= \\big($ [[0]], [[1]], [[2]] $\\big)$

\n

You must enter your answers exactly, using the function sqrt(x) as necessary.

", "adaptiveMarkingPenalty": 0, "scripts": {}, "marks": 0, "customName": "", "useCustomName": false, "sortAnswers": false, "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "gaps": [{"adaptiveMarkingPenalty": 0, "scripts": {}, "variableReplacements": [], "checkingType": "absdiff", "customMarkingAlgorithm": "", "valuegenerators": [], "answer": "({(a + c)} / Sqrt({(((a + c) ^ 2) + ((b + d) ^ 2) + ((g + f) ^ 2))}))", "showCorrectAnswer": true, "checkingAccuracy": "0.001", "checkVariableNames": false, "marks": "0.25", "customName": "", "useCustomName": false, "unitTests": [], "answerSimplification": "std", "variableReplacementStrategy": "originalfirst", "showPreview": true, "failureRate": 1, "type": "jme", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "vsetRange": [0, 1], "vsetRangePoints": 5}, {"adaptiveMarkingPenalty": 0, "scripts": {}, "variableReplacements": [], "checkingType": "absdiff", "customMarkingAlgorithm": "", "valuegenerators": [], "answer": "({(b + d)} / Sqrt({(((a + c) ^ 2) + ((b + d) ^ 2) + ((g + f) ^ 2))}))", "showCorrectAnswer": true, "checkingAccuracy": 0.001, "checkVariableNames": false, "marks": "0.25", "customName": "", "useCustomName": false, "unitTests": [], "answerSimplification": "std", "variableReplacementStrategy": "originalfirst", "showPreview": true, "failureRate": 1, "type": "jme", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "vsetRange": [0, 1], "vsetRangePoints": 5}, {"adaptiveMarkingPenalty": 0, "scripts": {}, "variableReplacements": [], "checkingType": "absdiff", "customMarkingAlgorithm": "", "valuegenerators": [], "answer": "({(g + f)} / Sqrt({(((a + c) ^ 2) + ((b + d) ^ 2) + ((g + f) ^ 2))}))", "showCorrectAnswer": true, "checkingAccuracy": 0.001, "checkVariableNames": false, "marks": "0.25", "customName": "", "useCustomName": false, "unitTests": [], "answerSimplification": "std", "variableReplacementStrategy": "originalfirst", "showPreview": true, "failureRate": 1, "type": "jme", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "vsetRange": [0, 1], "vsetRangePoints": 5}], "variableReplacementStrategy": "originalfirst", "type": "gapfill", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "showCorrectAnswer": true}], "ungrouped_variables": ["b4", "q", "s3", "s2", "s1", "s5", "s4", "ssquares", "v1", "v2", "a4", "a", "c", "b", "d", "g", "f", "m", "n", "ssquaresb", "ssquaresa", "v"], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "type": "question"}, {"name": "MATH6005 Assessment 2_Q3of6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}], "variables": {"ans2": {"templateType": "anything", "description": "", "name": "ans2", "definition": "precround(dot(c,d)/(lenc*lend),2)", "group": "Ungrouped variables"}, "lenc": {"templateType": "anything", "description": "", "name": "lenc", "definition": "abs(c)", "group": "Ungrouped variables"}, "d": {"templateType": "anything", "description": "", "name": "d", "definition": "vector(repeat(random(2..9)*sign(random(1,1)),3))", "group": "Ungrouped variables"}, "dot_of_cd": {"templateType": "anything", "description": "", "name": "dot_of_cd", "definition": "dot(c,d)", "group": "Ungrouped variables"}, "a": {"templateType": "anything", "description": "", "name": "a", "definition": "vector(repeat(random(1..9)*sign(random(1,-1)),3))", "group": "Ungrouped variables"}, "ans1": {"templateType": "anything", "description": "", "name": "ans1", "definition": "precround(dot(a,b)/(lena*lenb),2)", "group": "Ungrouped variables"}, "dot_of_ab": {"templateType": "anything", "description": "", "name": "dot_of_ab", "definition": "dot(a,b)", "group": "Ungrouped variables"}, "lenb": {"templateType": "anything", "description": "", "name": "lenb", "definition": "abs(b)", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "description": "", "name": "b", "definition": "vector(repeat(random(1..9)*sign(random(1,-1)),3))", "group": "Ungrouped variables"}, "lena": {"templateType": "anything", "description": "", "name": "lena", "definition": "abs(a)", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "description": "", "name": "c", "definition": "vector(repeat(random(2..9)*sign(random(1,1)),3))", "group": "Ungrouped variables"}, "ansrad2": {"templateType": "anything", "description": "", "name": "ansrad2", "definition": "precround(arccos(ans2),1)", "group": "Ungrouped variables"}, "lend": {"templateType": "anything", "description": "", "name": "lend", "definition": "abs(d)", "group": "Ungrouped variables"}, "ansrad": {"templateType": "anything", "description": "", "name": "ansrad", "definition": "precround(arccos(ans1),1)", "group": "Ungrouped variables"}}, "parts": [{"scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showFeedbackIcon": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "minValue": "ans1-0.005", "mustBeReducedPC": 0, "allowFractions": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReduced": false, "unitTests": [], "type": "numberentry", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "maxValue": "ans1+0.005", "marks": "0.5", "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "correctAnswerFraction": false}, {"notationStyles": ["plain", "en", "si-en"], "minValue": "ansrad-0.05", "mustBeReducedPC": 0, "allowFractions": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReduced": false, "unitTests": [], "type": "numberentry", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "maxValue": "ansrad+0.05", "marks": "1", "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "correctAnswerFraction": false}, {"notationStyles": ["plain", "en", "si-en"], "minValue": "dot_of_ab-0.001", "mustBeReducedPC": 0, "allowFractions": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReduced": false, "unitTests": [], "type": "numberentry", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "maxValue": "dot_of_ab+0.001", "marks": "0.5", "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "correctAnswerFraction": false}], "unitTests": [], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

$\\boldsymbol{a}=\\pmatrix{\\var{a[0]},\\var{a[1]},\\var{a[2]}}$ and $\\boldsymbol{b}=\\pmatrix{\\var{b[0]},\\var{b[1]},\\var{b[2]}}$

\n

$\\boldsymbol{a} \\cdot \\boldsymbol{b}=$ [[2]]

\n

$\\cos({\\theta})=$ [[0]]  (Give your answer to 2d.p.)

\n

$\\theta=$ [[1]](Give your answer, in radians, to 1d.p.)

", "customMarkingAlgorithm": "", "marks": 0, "variableReplacementStrategy": "originalfirst", "sortAnswers": false}], "statement": "

Find the angle  $ \\theta $  between the following pairs of vectors.

", "functions": {}, "tags": [], "ungrouped_variables": ["a", "lenb", "c", "b", "lenc", "d", "lend", "ans1", "ans2", "lena", "ansrad", "ansrad2", "dot_of_ab", "dot_of_cd"], "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "advice": "

Note that in this advice, the full calculator display is used in the calculation of each step; any rounding is purely for display clarity.

\n

The dot product of two vectors $\\boldsymbol{a}=\\pmatrix{a_1,a_2,a_3}$ and $\\boldsymbol{b}=\\pmatrix{b_1,b_2,b_3}$ is given by

\n

\\[\\boldsymbol{a\\cdot b}=a_1b_1+a_2b_2+a_3b_3\\]

\n

\n

$\\lvert\\boldsymbol{a}\\rvert=\\sqrt{a_1^2+a_2^2+a_3^2}$ ,$\\lvert\\boldsymbol{b}\\rvert=\\sqrt{b_1^2+b_2^2+b_3^2}$ are the lengths of the vectors $\\boldsymbol{a}$ and $\\boldsymbol{b}$.

\n

\n

and so

\n

\\[\\cos(\\theta)=\\frac{\\boldsymbol{a\\cdot b}}{\\lvert\\boldsymbol{a}\\rvert \\lvert\\boldsymbol{b}\\rvert}=\\frac{a_1b_1+a_2b_2+a_3b_3}{\\lvert\\boldsymbol{a}\\rvert \\lvert\\boldsymbol{b}\\rvert}.\\]

\n

In part a) therefore, we have

\n

\\[\\cos(\\theta)=\\frac{\\var{dot(a,b)}}{\\var{precround(lena,2)}\\times\\var{precround(lenb,2)}}=\\frac{\\var{dot(a,b)}}{\\var{precround(lena*lenb,2)}}=\\var{ans1} \\; \\text{to 2d.p.,}\\]

\n

Which gives an angle $\\theta =\\var{ansrad}$ radians to 1 d.p.

", "metadata": {"description": "

Find the dot product and the angle between two vectors

", "licence": "Creative Commons Attribution 4.0 International"}, "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "preamble": {"js": "", "css": ""}, "type": "question"}, {"name": "MATH6005 Assessment 2_Q4of6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}], "ungrouped_variables": ["a", "b", "c", "d", "f", "g", "result", "s1", "s2", "s3", "s4", "s5"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variables": {"c": {"definition": "s3*random(2..9)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "c"}, "a": {"definition": "s1*random(2..9)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "a"}, "b": {"definition": "s2*random(2..9)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "b"}, "f": {"definition": "random(2..9)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "f"}, "s1": {"definition": "random(1,-1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s1"}, "s3": {"definition": "random(1,-1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s3"}, "result": {"definition": "cross(vector(a,b,g),vector(c,d,f))", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "result"}, "s2": {"definition": "random(1,-1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s2"}, "s5": {"definition": "random(1,-1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s5"}, "d": {"definition": "s4*random(2..9)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "d"}, "g": {"definition": "s1*random(2..9)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "g"}, "s4": {"definition": "random(1,-1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s4"}}, "functions": {}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Given vectors $\\boldsymbol{A,\\;B}$, find $\\boldsymbol{A\\times B}$

"}, "preamble": {"js": "", "css": ""}, "advice": "

\\begin{align}
\\boldsymbol{v} \\times \\boldsymbol{w} &= \\begin{pmatrix} \\simplify[basic]{{b}*{f}-{g}*{d}} \\\\ \\simplify[basic]{{g}*{c}-{a}*{f}} \\\\ \\simplify[basic]{{a}*{d}-{b}*{c}}  \\end{pmatrix} \\\\[1em]
&= \\var{result}
\\end{align}

", "statement": "

You are given the vectors $\\boldsymbol{v} = \\var{vector(a,b,g)}$, $\\boldsymbol{w} = \\var{vector(c,d,f)}$.

", "tags": [], "parts": [{"variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "prompt": "

Find

\n

$\\boldsymbol{v} \\times \\boldsymbol{w} = $ [[0]]

", "customMarkingAlgorithm": "", "gaps": [{"tolerance": 0, "variableReplacementStrategy": "originalfirst", "markPerCell": true, "extendBaseMarkingAlgorithm": true, "numRows": "3", "customMarkingAlgorithm": "", "correctAnswer": "result", "unitTests": [], "marks": "1.5", "showCorrectAnswer": true, "allowFractions": true, "correctAnswerFractions": false, "variableReplacements": [], "showFeedbackIcon": true, "allowResize": false, "scripts": {}, "numColumns": 1, "type": "matrix"}], "unitTests": [], "marks": 0, "showCorrectAnswer": true, "sortAnswers": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "gapfill"}], "type": "question"}, {"name": "MATh6005 Assessment 2_Q5of6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}], "variable_groups": [], "functions": {}, "statement": "

After performing row operations on the augmented matrix for a particular system of equations, we get the matrix

\n

\\[ \\left[  \\begin{matrix} \\var{n11} & \\var{n12} & \\var{n13} & \\var{n14}\\\\ \\var{n21} & \\var{n22} & \\var{n23} & \\var{n24} \\\\ \\var{n31} & \\var{n32} & \\var{n33} & \\var{n34} \\end{matrix} \\right] \\]

", "rulesets": {}, "ungrouped_variables": ["a", "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "N", "n11", "n12", "n13", "n14", "n21", "n22", "n23", "n24", "n31", "n32", "n33", "n34"], "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"adaptiveMarkingPenalty": 0, "useCustomName": false, "scripts": {}, "type": "gapfill", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "customName": "", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "gaps": [{"adaptiveMarkingPenalty": 0, "shuffleChoices": false, "useCustomName": false, "scripts": {}, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "choices": ["no solutions", "a unique solution", "infinitely many solutions"], "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "distractors": ["Incorrect - if there were no solutions, the last row would be $\\left[ \\begin{matrix} 0 & 0 & 0 & \\neq 0 \\end{matrix} \\right]$", "Correct - there is a unique solution, since the last row is $\\left[ \\begin{matrix} 0 & 0 & \\var{n33} & \\var{n34} \\end{matrix} \\right]$ i.e. the 3rd entry is $\\neq 0$.", "Incorrect - if there were infinitely many solutions, the last row would be $\\left[ \\begin{matrix} 0 & 0 & 0 & 0 \\end{matrix} \\right]$"], "maxMarks": 0, "showCellAnswerState": true, "displayType": "radiogroup", "matrix": ["0", "0.25", 0], "customMarkingAlgorithm": "", "customName": "", "unitTests": [], "marks": 0}], "unitTests": [], "marks": 0, "sortAnswers": false, "prompt": "

Based on the matrix above, the system of equations has

\n

[[0]]

"}, {"adaptiveMarkingPenalty": 0, "useCustomName": false, "scripts": {}, "type": "gapfill", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "customName": "", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "gaps": [{"vsetRange": [0, 1], "adaptiveMarkingPenalty": 0, "useCustomName": false, "valuegenerators": [], "checkingType": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "showPreview": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true, "marks": "0.25", "extendBaseMarkingAlgorithm": true, "answer": "{a}", "unitTests": [], "vsetRangePoints": 5, "customMarkingAlgorithm": "", "customName": "", "checkVariableNames": false, "checkingAccuracy": 0.001}, {"vsetRange": [0, 1], "adaptiveMarkingPenalty": 0, "useCustomName": false, "valuegenerators": [], "checkingType": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "showPreview": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true, "marks": "0.25", "extendBaseMarkingAlgorithm": true, "answer": "{b}", "unitTests": [], "vsetRangePoints": 5, "customMarkingAlgorithm": "", "customName": "", "checkVariableNames": false, "checkingAccuracy": 0.001}, {"vsetRange": [0, 1], "adaptiveMarkingPenalty": 0, "useCustomName": false, "valuegenerators": [], "checkingType": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "showPreview": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true, "marks": "0.25", "extendBaseMarkingAlgorithm": true, "answer": "{c}", "unitTests": [], "vsetRangePoints": 5, "customMarkingAlgorithm": "", "customName": "", "checkVariableNames": false, "checkingAccuracy": 0.001}], "unitTests": [], "marks": 0, "sortAnswers": false, "prompt": "

In the case of a unique solution or infinitely many solutions, write down all solutions. Note, if there are an infinite number of solutions, use $t$ to denote the free variable. 

\n

If you stated that there were no solutions, simply write the text 

\n

NA

\n

in each of the boxes below.

\n

$x = $ [[0]]

\n

$y = $ [[1]]

\n

$z = $ [[2]]

\n

"}], "advice": "", "variables": {"k": {"group": "Ungrouped variables", "templateType": "anything", "name": "k", "definition": "{b}{h}+{j}{c}", "description": ""}, "n23": {"group": "Ungrouped variables", "templateType": "anything", "name": "n23", "definition": "{j}", "description": ""}, "n34": {"group": "Ungrouped variables", "templateType": "anything", "name": "n34", "definition": "{m}", "description": ""}, "f": {"group": "Ungrouped variables", "templateType": "anything", "name": "f", "definition": "random(-1..4 except 0)", "description": ""}, "d": {"group": "Ungrouped variables", "templateType": "anything", "name": "d", "definition": "random(2..8)", "description": ""}, "n32": {"group": "Ungrouped variables", "templateType": "anything", "name": "n32", "definition": "0", "description": ""}, "a": {"group": "Ungrouped variables", "templateType": "anything", "name": "a", "definition": "random(1..9)", "description": ""}, "n11": {"group": "Ungrouped variables", "templateType": "anything", "name": "n11", "definition": "{d}", "description": ""}, "l": {"group": "Ungrouped variables", "templateType": "anything", "name": "l", "definition": "random(2..7)", "description": ""}, "c": {"group": "Ungrouped variables", "templateType": "anything", "name": "c", "definition": "random(-3..6)", "description": ""}, "n31": {"group": "Ungrouped variables", "templateType": "anything", "name": "n31", "definition": "0", "description": ""}, "j": {"group": "Ungrouped variables", "templateType": "anything", "name": "j", "definition": "random(-2..6 except 0)", "description": ""}, "n33": {"group": "Ungrouped variables", "templateType": "anything", "name": "n33", "definition": "{l}", "description": ""}, "m": {"group": "Ungrouped variables", "templateType": "anything", "name": "m", "definition": "{c}{l}", "description": ""}, "n21": {"group": "Ungrouped variables", "templateType": "number", "name": "n21", "definition": "0", "description": ""}, "g": {"group": "Ungrouped variables", "templateType": "anything", "name": "g", "definition": "random(-2..3 except 0)", "description": ""}, "b": {"group": "Ungrouped variables", "templateType": "anything", "name": "b", "definition": "random(-5..5)", "description": ""}, "n22": {"group": "Ungrouped variables", "templateType": "anything", "name": "n22", "definition": "{h}", "description": ""}, "n24": {"group": "Ungrouped variables", "templateType": "anything", "name": "n24", "definition": "{k}", "description": ""}, "N": {"group": "Ungrouped variables", "templateType": "anything", "name": "N", "definition": "matrix([{n11},{n12},{n13},{n14}],[{n21},{n22},{n23},{n24}],[{n31},{n32},{n33},{n34}])", "description": ""}, "n12": {"group": "Ungrouped variables", "templateType": "anything", "name": "n12", "definition": "{f}", "description": ""}, "n14": {"group": "Ungrouped variables", "templateType": "anything", "name": "n14", "definition": "{d}{a} +{f}{b} + {g}{c}", "description": ""}, "n13": {"group": "Ungrouped variables", "templateType": "anything", "name": "n13", "definition": "{g}", "description": ""}, "h": {"group": "Ungrouped variables", "templateType": "anything", "name": "h", "definition": "random(-4..-1)", "description": ""}}, "tags": [], "preamble": {"js": "", "css": ""}, "metadata": {"licence": "None specified", "description": ""}, "type": "question"}, {"name": "GE4", "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": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}], "variables": {"g": {"definition": "random(1..10)", "description": "", "name": "g", "group": "Ungrouped variables", "templateType": "anything"}, "n32": {"definition": "0", "description": "", "name": "n32", "group": "Ungrouped variables", "templateType": "anything"}, "n11": {"definition": "{a}", "description": "", "name": "n11", "group": "Ungrouped variables", "templateType": "anything"}, "n31": {"definition": "0", "description": "", "name": "n31", "group": "Ungrouped variables", "templateType": "anything"}, "f": {"definition": "random(-14..16 except 0)", "description": "", "name": "f", "group": "Ungrouped variables", "templateType": "anything"}, "N": {"definition": "matrix([{n11},{n12},{n13},{n14}],[{n21},{n22},{n23},{n24}],[{n31},{n32},{n33},{n34}])", "description": "", "name": "N", "group": "Ungrouped variables", "templateType": "anything"}, "n13": {"definition": "{c}", "description": "", "name": "n13", "group": "Ungrouped variables", "templateType": "anything"}, "a": {"definition": "random(1..13)", "description": "", "name": "a", "group": "Ungrouped variables", "templateType": "anything"}, "k": {"definition": "random(-15..15 except 0)", "description": "", "name": "k", "group": "Ungrouped variables", "templateType": "anything"}, "n33": {"definition": "{k}", "description": "", "name": "n33", "group": "Ungrouped variables", "templateType": "anything"}, "h": {"definition": "random(1..10)", "description": "", "name": "h", "group": "Ungrouped variables", "templateType": "anything"}, "n34": {"definition": "{j}", "description": "", "name": "n34", "group": "Ungrouped variables", "templateType": "anything"}, "n12": {"definition": "{b}", "description": "", "name": "n12", "group": "Ungrouped variables", "templateType": "anything"}, "n14": {"definition": "{d}", "description": "", "name": "n14", "group": "Ungrouped variables", "templateType": "anything"}, "r2": {"definition": "random(6..10)", "description": "", "name": "r2", "group": "Ungrouped variables", "templateType": "anything"}, "n23": {"definition": "{g}", "description": "", "name": "n23", "group": "Ungrouped variables", "templateType": "anything"}, "j": {"definition": "random(1..6 except 0)", "description": "", "name": "j", "group": "Ungrouped variables", "templateType": "anything"}, "n24": {"definition": "{h}", "description": "", "name": "n24", "group": "Ungrouped variables", "templateType": "anything"}, "b": {"definition": "random(-12..15 except 0)", "description": "", "name": "b", "group": "Ungrouped variables", "templateType": "anything"}, "r1": {"definition": "random(1..5)", "description": "", "name": "r1", "group": "Ungrouped variables", "templateType": "anything"}, "d": {"definition": "random(2..5)", "description": "", "name": "d", "group": "Ungrouped variables", "templateType": "anything"}, "c": {"definition": "random(-10..10 except 0)", "description": "", "name": "c", "group": "Ungrouped variables", "templateType": "anything"}, "n21": {"definition": "0", "description": "", "name": "n21", "group": "Ungrouped variables", "templateType": "number"}, "n22": {"definition": "{f}", "description": "", "name": "n22", "group": "Ungrouped variables", "templateType": "anything"}}, "variable_groups": [{"name": "Unnamed group", "variables": []}], "advice": "", "ungrouped_variables": ["a", "b", "c", "d", "f", "g", "h", "j", "N", "n11", "n12", "n13", "n14", "n21", "n22", "n23", "n24", "n31", "n32", "n33", "n34", "k", "r1", "r2"], "rulesets": {}, "statement": "

After performing row operations on the augmented matrix for a particular system of equations, we get the matrix

\n

\\[ \\left[  \\begin{matrix} \\var{n11} & \\var{n12} & \\var{n13}-\\var{n34}k & \\var{n14}\\\\ \\var{n21} & \\var{n22} & \\var{n23}k & \\var{n24} \\\\ \\var{n31} & \\var{n32} & \\var{n33}(k-\\var{r1})(k-\\var{r2}) & -(k -\\var{r1}) \\end{matrix} \\right] \\]

", "metadata": {"description": "", "licence": "None specified"}, "functions": {}, "preamble": {"css": "", "js": ""}, "tags": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"scripts": {}, "prompt": "

The system of equations has no solution when

\n

$k = $ [[0]] 

", "customMarkingAlgorithm": "", "unitTests": [], "gaps": [{"showPreview": true, "vsetRangePoints": 5, "valuegenerators": [], "adaptiveMarkingPenalty": 0, "customName": "", "scripts": {}, "unitTests": [], "failureRate": 1, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "checkVariableNames": false, "showCorrectAnswer": true, "vsetRange": [0, 1], "marks": "0.5", "type": "jme", "extendBaseMarkingAlgorithm": true, "answer": "{r2}", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": [], "checkingType": "absdiff"}], "marks": 0, "adaptiveMarkingPenalty": 0, "customName": "", "type": "gapfill", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": [], "sortAnswers": false}, {"scripts": {}, "prompt": "

The system of equations has infinitely many solutions when

\n

$k = $ [[0]]

", "customMarkingAlgorithm": "", "unitTests": [], "gaps": [{"showPreview": true, "vsetRangePoints": 5, "valuegenerators": [], "adaptiveMarkingPenalty": 0, "customName": "", "scripts": {}, "unitTests": [], "failureRate": 1, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "checkVariableNames": false, "showCorrectAnswer": true, "vsetRange": [0, 1], "marks": "0.5", "type": "jme", "extendBaseMarkingAlgorithm": true, "answer": "{r1}", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": [], "checkingType": "absdiff"}], "marks": 0, "adaptiveMarkingPenalty": 0, "customName": "", "type": "gapfill", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": [], "sortAnswers": false}, {"scripts": {}, "prompt": "

The system of equations has a unique solution when

\n

$k \\neq $ [[0]] 

", "customMarkingAlgorithm": "", "unitTests": [], "gaps": [{"scripts": {}, "settings": {"correctAnswer": "[{r1}, {r2}]", "allowFractions": false, "correctAnswerFractions": false}, "customMarkingAlgorithm": "", "unitTests": [], "marks": "0.25", "adaptiveMarkingPenalty": 0, "customName": "", "type": "list-of-numbers", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": []}], "marks": 0, "adaptiveMarkingPenalty": 0, "customName": "", "type": "gapfill", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": [], "sortAnswers": false}, {"scripts": {}, "prompt": "

In the case of infinitely many solutions, find the solutions.  Use t to denote the free varible

\n

Write your answer as fractions $\\frac{p}{q}$ or whole numbers (no decimal fractions).

\n

$x = $ [[0]]

\n

$y = $ [[1]]

\n

$z = $ [[2]]

\n

", "customMarkingAlgorithm": "", "unitTests": [], "gaps": [{"showPreview": true, "vsetRangePoints": 5, "valuegenerators": [{"value": "", "name": "t"}], "adaptiveMarkingPenalty": 0, "customName": "", "scripts": {}, "unitTests": [], "failureRate": 1, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "checkVariableNames": false, "showCorrectAnswer": true, "vsetRange": [0, 1], "marks": "0.5", "type": "jme", "extendBaseMarkingAlgorithm": true, "answer": "({d}-{b}(({h}-{g}*{r1}t))/{f} -({c}-{j}{r1})t)/{a}", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": [], "checkingType": "absdiff"}, {"showPreview": true, "vsetRangePoints": 5, "valuegenerators": [{"value": "", "name": "t"}], "adaptiveMarkingPenalty": 0, "customName": "", "scripts": {}, "unitTests": [], "failureRate": 1, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "checkVariableNames": false, "showCorrectAnswer": true, "vsetRange": [0, 1], "marks": "0.5", "type": "jme", "extendBaseMarkingAlgorithm": true, "answer": "({h}-{g}*{r1}t)/({f})", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": [], "checkingType": "absdiff"}, {"showPreview": true, "vsetRangePoints": 5, "valuegenerators": [{"value": "", "name": "t"}], "adaptiveMarkingPenalty": 0, "customName": "", "scripts": {}, "unitTests": [], "failureRate": 1, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "checkVariableNames": false, "showCorrectAnswer": true, "vsetRange": [0, 1], "marks": "0.25", "type": "jme", "extendBaseMarkingAlgorithm": true, "answer": "t", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": [], "checkingType": "absdiff"}], "marks": 0, "adaptiveMarkingPenalty": 0, "customName": "", "type": "gapfill", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": [], "sortAnswers": false}], "type": "question"}]}], "type": "exam", "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}], "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": []}