// Numbas version: exam_results_page_options {"name": "Numbas demo: matrix entry part type", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Numbas demo: matrix entry part type", "tags": [], "metadata": {"description": "

A demo of the matrix entry part and its options.

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

The matrix entry part type asks the student to write a matrix - a two-dimensional array of numbers. The student's answer is correct if their matrix is the expected size, and each cell is equal to the corresponding cell in the expected answer. You can award partial marks for each correct cell.

\n

See this question on the public editor.

", "advice": "", "rulesets": {}, "extensions": [], "variables": {"random_matrix": {"name": "random_matrix", "group": "Ungrouped variables", "definition": "matrix(\n repeat( repeat(random(1..5#0),3), 2)\n)", "description": "", "templateType": "anything"}, "fraction_matrix": {"name": "fraction_matrix", "group": "Ungrouped variables", "definition": "matrix([\n [1,2],\n [3,4]\n])/7", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["random_matrix", "fraction_matrix"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "matrix", "useCustomName": true, "customName": "Identity matrix", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Write a $3 \\times 3$ identity matrix, $\\var{id(3)}$.

", "correctAnswer": "id(3)", "correctAnswerFractions": false, "numRows": 1, "numColumns": 1, "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": true, "customName": "Set the initial size", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You can set the initial size of the matrix.

\n

Write $\\var{matrix([[2,3],[4,-1]])}$.

", "correctAnswer": "matrix([[2,3],[4,-1]])", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": true, "customName": "Fixed size", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You can fix the size of the matrix.

\n

Write the vector $\\var{vector(1,2,3)}$.

", "correctAnswer": "vector(1,2,3)", "correctAnswerFractions": false, "numRows": "3", "numColumns": "1", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": true, "customName": "Precision restriction", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Like the number entry part, you can ask for the student to give each entry in the matrix to a certain number of decimal places.

\n

Write $\\var{random_matrix}$ to two decimal places.

", "correctAnswer": "random_matrix", "correctAnswerFractions": false, "numRows": "numrows(random_matrix)", "numColumns": "numcolumns(random_matrix)", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": "50", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true}, {"type": "matrix", "useCustomName": true, "customName": "Award marks for each correct cell", "marks": "9", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Rather than requiring the entire matrix to be correct, you can award partial credit for each correct cell.

\n

Write $\\var{id(3)}$.

", "correctAnswer": "id(3)", "correctAnswerFractions": false, "numRows": "3", "numColumns": "3", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": true, "customName": "Allow fractions", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You can allow the student to enter fractions in each cell.

\n

Write $\\var[fractionnumbers,flatfractions]{fraction_matrix}$.

", "correctAnswer": "fraction_matrix", "correctAnswerFractions": true, "numRows": "numrows(fraction_matrix)", "numColumns": "numcolumns(fraction_matrix)", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}