// Numbas version: exam_results_page_options {"name": "Vectors: Magnitude 2a", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Vectors: Magnitude 2a", "tags": [], "metadata": {"description": "

Calculate the magnitude of a 3-dimensional vector, where $\\mathbf v$ is written in the form $\\pmatrix{v_1\\\\v_2\\\\v_3}$.

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

Calculate the magnitude of the vector $\\mathbf v = \\var{v}$ .

", "advice": "

For a vector of the form $\\mathbf a = \\begin{pmatrix} a_1 \\\\ a_2 \\\\ a_3 \\end{pmatrix}$, the magnitude is found by calculating the square root of the sum of the components squared:

\n

\\[ |\\mathbf a| = \\sqrt{a_1^2+a_2^2+a_3^2}.\\]

\n

Therefore, for the vector $\\mathbf v = \\var{v}$,

\n

{advice}

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"magv": {"name": "magv", "group": "Ungrouped variables", "definition": "length(v)", "description": "", "templateType": "anything", "can_override": false}, "magv2": {"name": "magv2", "group": "Ungrouped variables", "definition": "precround(magv,2)", "description": "", "templateType": "anything", "can_override": false}, "advice": {"name": "advice", "group": "Ungrouped variables", "definition": "if(magv-magv2=0,'{sol1}','{sol2}')", "description": "", "templateType": "anything", "can_override": false}, "sol1": {"name": "sol1", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\begin{split} |\\\\mathbf v| &\\\\,= \\\\simplify[!collectNumbers]{sqrt({v[0]}^2+{v[1]}^2+{v[2]}^2)} \\\\\\\\ &\\\\,= \\\\sqrt{\\\\var{v[0]^2+v[1]^2+v[2]^2}} \\\\\\\\ &\\\\, = \\\\var{magv2}. \\\\end{split} \\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "sol2": {"name": "sol2", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\begin{split} |\\\\mathbf v| &\\\\,= \\\\simplify[!collectNumbers]{sqrt({v[0]}^2+{v[1]}^2+{v[2]}^2)} \\\\\\\\ &\\\\,= \\\\sqrt{\\\\var{v[0]^2+v[1]^2+v[2]^2}} \\\\\\\\ &\\\\, = \\\\var{magv2} \\\\text{ (2 d.p.)} \\\\end{split} \\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "vector(repeat(random(-10..10),3))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["v", "magv", "magv2", "advice", "sol1", "sol2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$|\\mathbf v |= $[[0]]

\n

(Give your answer to 2 decimal places where necessary)

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "answer": "sqrt({magv^2})", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "answer": "{magv2}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}