// Numbas version: finer_feedback_settings {"name": "Adding vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Adding vectors", "tags": [], "metadata": {"description": "
Adding vectors of random size. Advice (i.e. solution) has conditional visibility to show only the correct size.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "We can add any two vectors which have the same size. To add the vectors, we add each entry separately.
\n\\[\\var{v}+\\var{w}=\\begin{pmatrix}\\simplify[]{{v[0]}+{w[0]}} \\\\ \\simplify[]{{v[1]}+{w[1]}} \\end{pmatrix} = \\var{vectorsum}\\]
\n\\[\\var{v}+\\var{w}=\\begin{pmatrix}\\simplify[]{{v[0]}+{w[0]}} \\\\ \\simplify[]{{v[1]}+{w[1]}} \\\\\\simplify[]{{v[2]}+{w[2]}} \\end{pmatrix} = \\var{vectorsum}\\]
\n\\[\\var{v}+\\var{w}=\\begin{pmatrix}\\simplify[]{{v[0]}+{w[0]}} \\\\ \\simplify[]{{v[1]}+{w[1]}} \\\\\\simplify[]{{v[2]}+{w[2]}} \\\\\\simplify[]{{v[3]}+{w[3]}} \\end{pmatrix} = \\var{vectorsum}\\]
\n\\[\\var{v}+\\var{w}=\\begin{pmatrix}\\simplify[]{{v[0]}+{w[0]}} \\\\ \\simplify[]{{v[1]}+{w[1]}} \\\\\\simplify[]{{v[2]}+{w[2]}} \\\\\\simplify[]{{v[3]}+{w[3]}} \\\\ \\simplify[]{{v[4]}+{w[4]}} \\end{pmatrix} = \\var{vectorsum}\\]
\n\\[\\var{v}+\\var{w}=\\begin{pmatrix}\\simplify[]{{v[0]}+{w[0]}} \\\\ \\simplify[]{{v[1]}+{w[1]}} \\\\\\simplify[]{{v[2]}+{w[2]}} \\\\\\simplify[]{{v[3]}+{w[3]}} \\\\ \\simplify[]{{v[4]}+{w[4]}} \\\\\\simplify[]{{v[5]}+{w[5]}} \\end{pmatrix} = \\var{vectorsum}\\]
", "rulesets": {}, "extensions": [], "variables": {"vectorsum": {"name": "vectorsum", "group": "Ungrouped variables", "definition": "v+w", "description": "Sum of vectors v and w
", "templateType": "anything"}, "rows": {"name": "rows", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "size of the vectors
", "templateType": "anything"}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "vector((repeat(random(-5..5),rows)))", "description": "randomly generated vector of random size.
", "templateType": "anything"}, "w": {"name": "w", "group": "Ungrouped variables", "definition": "vector(repeat(random(-5..5),rows))", "description": "randomly generated matrix of same size as matrixA
", "templateType": "anything"}}, "variablesTest": {"condition": "not is_zero(v) and not is_zero(w)", "maxRuns": 100}, "ungrouped_variables": ["vectorsum", "rows", "v", "w"], "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": "Calculate \\(\\var{v} + \\var{w}=\\) [[0]].
\n", "gaps": [{"type": "matrix", "useCustomName": true, "customName": "Gap 0", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "vectorsum", "correctAnswerFractions": false, "numRows": "1", "numColumns": "1", "allowResize": true, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": "1", "minRows": 1, "maxRows": 0}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Tatiana Tyukina", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/341/"}, {"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}]}]}], "contributors": [{"name": "Tatiana Tyukina", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/341/"}, {"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}]}