// Numbas version: exam_results_page_options {"metadata": {"licence": "None specified", "description": ""}, "timing": {"timedwarning": {"action": "none", "message": ""}, "timeout": {"action": "none", "message": ""}, "allowPause": true}, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questions": [{"name": "TP1", "extensions": [], "custom_part_types": [], "resources": [["question-resources/image_K0BP3FV.png", "/srv/numbas/media/question-resources/image_K0BP3FV.png"], ["question-resources/image_jS71fGY.png", "/srv/numbas/media/question-resources/image_jS71fGY.png"], ["question-resources/image_8rDGI2c.png", "/srv/numbas/media/question-resources/image_8rDGI2c.png"], ["question-resources/image_AgeDfYh.png", "/srv/numbas/media/question-resources/image_AgeDfYh.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}], "parts": [{"variableReplacementStrategy": "originalfirst", "sortAnswers": false, "prompt": "

$3x+A=5+A$ [[0]]

", "type": "gapfill", "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "showFeedbackIcon": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCellAnswerState": true, "type": "1_n_2", "scripts": {}, "customMarkingAlgorithm": "", "maxMarks": 0, "displayType": "radiogroup", "matrix": ["1", 0], "showCorrectAnswer": true, "showFeedbackIcon": true, "distractors": ["Well done. The statement is true, as we are adding the same thing to both sides. Increasing the left hand side and the right hand side by the same amount means that the sides are still equal.", "Your answer is incorrect. The statement is true, as we are adding the same thing to both sides. Increasing the left hand side and the right hand side by the same amount means that the sides are still equal."], "displayColumns": 0, "unitTests": [], "minMarks": 0, "marks": 0, "extendBaseMarkingAlgorithm": true, "choices": ["True", "False"], "shuffleChoices": false}], "unitTests": [], "variableReplacements": [], "marks": 0, "extendBaseMarkingAlgorithm": true}, {"variableReplacementStrategy": "originalfirst", "sortAnswers": false, "prompt": "

$9x^2=25$ [[0]]

", "type": "gapfill", "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "showFeedbackIcon": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCellAnswerState": true, "type": "1_n_2", "scripts": {}, "customMarkingAlgorithm": "", "maxMarks": 0, "displayType": "radiogroup", "matrix": ["1", 0], "showCorrectAnswer": true, "showFeedbackIcon": true, "distractors": ["Correct - the statement is true. Both sides were squared - i.e. the same thing was done to both sides. Multiplying both sides by the same thing means both sides are still equal. Since $3x=5$, multiplying by $3x$ is the same as multiplying by $5$ (i.e. multiplying the left hand side by $3x$ and the right hand side by $5$ is doing the same thing to both sides.)", "Incorrect - the statement is true. Both sides were squared - i.e. the same thing was done to both sides. Multiplying both sides by the same thing means both sides are still equal. Since $3x=5$, multiplying by $3x$ is the same as multiplying by $5$ (i.e. multiplying the left hand side by $3x$ and the right hand side by $5$ is doing the same thing to both sides.)"], "displayColumns": 0, "unitTests": [], "minMarks": 0, "marks": 0, "extendBaseMarkingAlgorithm": true, "choices": ["True", "False"], "shuffleChoices": false}], "unitTests": [], "variableReplacements": [], "marks": 0, "extendBaseMarkingAlgorithm": true}, {"variableReplacementStrategy": "originalfirst", "sortAnswers": false, "prompt": "

$x=5-3$ [[0]]

", "type": "gapfill", "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "showFeedbackIcon": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCellAnswerState": true, "type": "1_n_2", "scripts": {}, "customMarkingAlgorithm": "", "maxMarks": 0, "displayType": "radiogroup", "matrix": [0, "1"], "showCorrectAnswer": true, "showFeedbackIcon": true, "distractors": ["Incorrect - the statement is false. To get $x$ on its own on the left hand side, we need to divide by $3$. To keep both sides equal, we must do the same to the right hand side. If we subtract $3$ instead, we have done something different to each side, so the sides are no longer equal.", "Correct - the statement is false. To get $x$ on its own on the left hand side, we need to divide by $3$. To keep both sides equal, we must do the same to the right hand side. If we subtract $3$ instead, we have done something different to each side, so the sides are no longer equal."], "displayColumns": 0, "unitTests": [], "minMarks": 0, "marks": 0, "extendBaseMarkingAlgorithm": true, "choices": ["True", "False"], "shuffleChoices": false}], "unitTests": [], "variableReplacements": [], "marks": 0, "extendBaseMarkingAlgorithm": true}, {"variableReplacementStrategy": "originalfirst", "sortAnswers": false, "prompt": "

$x=\\frac{5}{-3}$ [[0]]

", "type": "gapfill", "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "showFeedbackIcon": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCellAnswerState": true, "type": "1_n_2", "scripts": {}, "customMarkingAlgorithm": "", "maxMarks": 0, "displayType": "radiogroup", "matrix": [0, "1"], "showCorrectAnswer": true, "showFeedbackIcon": true, "distractors": ["Incorrect - the statement is false. To get $x$ on its own on the left hand side, we need to divide by $3$. To keep both sides equal, we must do the same to the right hand side. If we divide the right hand side by $-3$ instead, we have divided the left by $3$ but the right by $-3$ i.e. we have done something different to each side, so they are no longer equal.", "Correct - the statement is false. To get $x$ on its own on the left hand side, we need to divide by $3$. To keep both sides equal, we must do the same to the right hand side. If we divide the right hand side by $-3$ instead, we have divided the left by $3$ but the right by $-3$ i.e. we have done something different to each side, so they are no longer equal."], "displayColumns": 0, "unitTests": [], "minMarks": 0, "marks": 0, "extendBaseMarkingAlgorithm": true, "choices": ["True", "False"], "shuffleChoices": false}], "unitTests": [], "variableReplacements": [], "marks": 0, "extendBaseMarkingAlgorithm": true}], "variable_groups": [], "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

If $3x=5$, decide whether each of the following statements is true or false.

", "preamble": {"css": "", "js": ""}, "ungrouped_variables": [], "advice": "", "functions": {}, "variables": {}, "metadata": {"description": "", "licence": "None specified"}, "tags": [], "type": "question"}, {"name": "TP4", "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/"}], "advice": "

We wish to solve for $x$, so we must get $x$ on its own. At the moment, the only $x$ in the equation is under the square root. Because there is something else (in this case a 9) being added to the $x^2$ under the square root, the $x^2$ and the 9 are trapped together until the square root is gone.

\n

How can we get rid of a square root? Ans: Apply the inverse function of the square root (i.e. do the opposite of taking the square root) which is to square.

\n

Remember, if we wish to keep the equation balanced i.e. keep both sides equal, we must always do the same thing to both sides. So, if we square the left hand side in order to get rid of the square root, we must also square the right hand side:

\n

\\[ \\begin{align*} \\left( \\sqrt{x^2 + 9} \\right)^{\\color{red}{2}} & = 5^{\\color{red}{2}}\\\\ \\Rightarrow \\  x^2 + 9 & = 25 \\end{align*}\\]

\n

Now that the square root is gone, the $x^2$ and the 9 are no longer trapped together. If we wish to get $x^2$ on its own therefore, we can now get rid of the 9 that is being added on the left hand side. How do we do this? Ans: Apply the inverse function of adding (i.e. do the opposite to adding) which is subtracting. So we subtract 9. As before, if we wish to keep the equation balanced i.e. keep both sides equal, we must do the same to both sides. So, if we subtract 9 from the left hand side, we must also subtract 9 from the right hand side:

\n

\\[ \\begin{align*} x^2 + 9 \\color{red}{- 9} & = 25 \\color{red}{- 9}\\\\ \\Rightarrow \\ x^2 & = 16  \\end{align*} \\]

\n

Finally, we wish to find $x$ rather than $x^2$, so we apply the inverse function of squaring (i.e. do the opposite of squaring). The inverse of squaring is to take the square root. Again, in order to keep both sides equal, we must also take the square root of the right hand side:

\n

\\[ \\begin{align*} \\color{red}{\\sqrt{\\color{black}{x^2}}} & = \\color{red}{\\sqrt{\\color{black}{16}}}\\\\ x & = \\color{red}{\\pm} 4  \\end{align*}.\\]

\n

Note: When taking the square root (or fourth root or sixth root or any even root) we must always remember to include the negative solutions e.g. $4^2=16$ but so also is $(-4)^2$. If we only include the positive square root of 4, we are missing out on the solution of -4.

", "variables": {}, "variable_groups": [], "ungrouped_variables": [], "preamble": {"css": "", "js": ""}, "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "statement": "

Given the equation $\\sqrt{x^2+9}=5$, solve for $x$.

", "metadata": {"description": "", "licence": "None specified"}, "functions": {}, "parts": [{"showCorrectAnswer": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "type": "gapfill", "variableReplacements": [], "scripts": {}, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "sortAnswers": false, "prompt": "

$x= $ [[0]]

\n

", "marks": 0, "gaps": [{"showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "variableReplacements": [], "type": "list-of-numbers", "settings": {"correctAnswer": "[-4,4]"}, "marks": "4", "unitTests": [], "scripts": {"mark": {"order": "instead", "script": "var answer=this.studentAnswer;\n// mark the answer\nif(answer==[-4,4]) {\n this.setCredit(1,'Correct. Well done!');\n} else if(answer==[4,-4]) {\n this.setCredit(1,'Correct. Well done!');\n} else if(answer==4) {\n this.setCredit(0.5,'Some good work here, but not quite there yet. Did you remember to take the positive and negative square root?');\n} else if(answer==-4){\n this.setCredit(0.5, 'Some good work here, but not quite there yet. Did you remember to take the positive and negative square root?');\n} else{\n this.setCredit(0,'Not correct');\n}\n\n// you must set this.answered to say if the student gave a valid answer\nthis.answered = answer!==undefined;"}}}]}], "type": "question"}, {"name": "MATH6005 T3Q4 (adaptive)", "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/"}], "functions": {}, "tags": [], "variable_groups": [], "rulesets": {}, "variables": {"X": {"name": "X", "definition": "matrix([5, 2, 0], [1, 1, -1], [3, 1, 1])", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "Z": {"name": "Z", "definition": "matrix([1, 1, 5], [2, -1, -2], [3, 4, 7])", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "invX": {"name": "invX", "definition": "matrix([\n[1,-1,-1],\n[-2,5/2,5/2],\n[-1,1/2,3/2]\n])", "description": "", "templateType": "anything", "group": "Ungrouped variables"}}, "metadata": {"licence": "None specified", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "sortAnswers": false, "prompt": "

First find $X^{-1}$:

\n

$X^{-1} = $[[0]]

\n

$Y = $ [[1]]

", "variableReplacementStrategy": "originalfirst", "gaps": [{"markPerCell": true, "correctAnswerFractions": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "tolerance": 0, "showCorrectAnswer": true, "correctAnswer": "matrix([\n[1,-1,-1],\n[-2,5/2,5/2],\n[-1,1/2,3/2]\n])", "variableReplacementStrategy": "originalfirst", "allowResize": false, "numRows": "3", "type": "matrix", "allowFractions": true, "customMarkingAlgorithm": "", "variableReplacements": [], "marks": "9", "numColumns": "3", "scripts": {}, "showFeedbackIcon": true}, {"markPerCell": true, "correctAnswerFractions": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "tolerance": 0, "showCorrectAnswer": true, "correctAnswer": "invX*Z", "variableReplacementStrategy": "originalfirst", "allowResize": false, "numRows": "3", "type": "matrix", "allowFractions": true, "customMarkingAlgorithm": "", "variableReplacements": [{"variable": "invX", "part": "p0g0", "must_go_first": true}], "marks": "9", "numColumns": "3", "scripts": {}, "showFeedbackIcon": true}], "type": "gapfill", "customMarkingAlgorithm": "", "variableReplacements": [], "marks": 0, "scripts": {}, "showFeedbackIcon": true}], "ungrouped_variables": ["X", "Z", "invX"], "statement": "

Let $X=\\begin{pmatrix} 5 & 2 & 0\\\\ 1 & 1 & -1\\\\ 3 & 1 & 1 \\end{pmatrix}$ and $Z = \\begin{pmatrix} 1 & 1 & 5\\\\ 2 & -1 & -2\\\\ 3 & 4 & 7 \\end{pmatrix}$. Find the matrix $Y$ such that $XY = Z$.

", "advice": "", "preamble": {"js": "", "css": ""}, "type": "question"}, {"name": "Cofactors, Determinant and Inverse of a 3x3 matrix (Adaptive)", "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/"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"description": "

Cofactors Determinant and inverse of a 3x3 matrix.

", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"css": "", "js": ""}, "statement": "", "variable_groups": [{"variables": ["cof11", "cof12", "cof13", "cof21", "cof22", "cof23", "cof31", "cof32", "cof33"], "name": "cofactors"}, {"variables": [], "name": "Unnamed group"}], "variables": {"detA": {"definition": "a11*cof11+a12*cof12+a13*cof13", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "detA"}, "a31": {"definition": "random(0..10)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "a31"}, "cof21": {"definition": "a32*a13-a12*a33", "group": "cofactors", "description": "", "templateType": "anything", "name": "cof21"}, "a21": {"definition": "random(0..10)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "a21"}, "a32": {"definition": "random(0..10)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "a32"}, "a22": {"definition": "random(0..5 except(a21*a12/a11))", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "a22"}, "cof32": {"definition": "a13*a21-a11*a23", "group": "cofactors", "description": "", "templateType": "anything", "name": "cof32"}, "a13": {"definition": "random(-5..10)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "a13"}, "a33": {"definition": "random(0..20)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "a33"}, "cof33": {"definition": "a11*a22-a12*a21", "group": "cofactors", "description": "", "templateType": "anything", "name": "cof33"}, "cof22": {"definition": "a11*a33-a31*a13", "group": "cofactors", "description": "", "templateType": "anything", "name": "cof22"}, "a11": {"definition": "random(-3..3)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "a11"}, "inverseA": {"definition": "matrix([cof11,cof21,cof31],[cof12,cof22,cof32],[cof13,cof23,cof33])/detA", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "inverseA"}, "cof11": {"definition": "a22*a33-a32*a23", "group": "cofactors", "description": "", "templateType": "anything", "name": "cof11"}, "matrixA": {"definition": "matrix([a11,a12,a13],[a21,a22,a23],[a31,a32,a33])", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "matrixA"}, "a23": {"definition": "random(-4..4)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "a23"}, "cof12": {"definition": "a23*a31-a21*a33", "group": "cofactors", "description": "", "templateType": "anything", "name": "cof12"}, "cof31": {"definition": "a12*a23-a22*a13", "group": "cofactors", "description": "", "templateType": "anything", "name": "cof31"}, "cof23": {"definition": "a12*a31-a11*a32", "group": "cofactors", "description": "

cof23

", "templateType": "anything", "name": "cof23"}, "cof13": {"definition": "a21*a32-a31*a22", "group": "cofactors", "description": "", "templateType": "anything", "name": "cof13"}, "a12": {"definition": "random(0..10)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "a12"}}, "rulesets": {}, "functions": {}, "ungrouped_variables": ["matrixA", "a11", "a12", "a21", "a22", "a13", "a23", "a31", "a32", "a33", "inverseA", "detA"], "tags": [], "parts": [{"customName": "", "prompt": "

\n

Calculate the nine cofactors of A=$\\var{matrixA}$?

\n

$A _{11}$ cofactor in position 1,1[[0]]

\n

$A_{12}$ cofactor in position 1,2[[1]]

\n

$A_{13}$ cofactor in position 1,3[[2]]

\n

$A_{21}$ cofactor in position 2,1[[3]]

\n

$A_{22}$ cofactor in position 2,2[[4]]

\n

$A_{23}$ cofactor in position 2,3[[5]]

\n

$A_{31}$ cofactor in position 3,1[[6]]

\n

$A_{32}$ cofactor in position 3,2[[7]]

\n

$A_{33}$ cofactor in position 3,3[[8]]

", "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "adaptiveMarkingPenalty": 0, "type": "gapfill", "useCustomName": false, "sortAnswers": false, "gaps": [{"customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "{cof11}", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "showFractionHint": true, "mustBeReduced": false, "maxValue": "{cof11}", "customName": "", "variableReplacements": [], "unitTests": [], "allowFractions": true, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "showCorrectAnswer": true, "marks": "0.2", "scripts": {}}, {"customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "{cof12}", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "showFractionHint": true, "mustBeReduced": false, "maxValue": "{cof12}", "customName": "", "variableReplacements": [], "unitTests": [], "allowFractions": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "showCorrectAnswer": true, "marks": "0.2", "scripts": {}}, {"customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "{cof13}", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "showFractionHint": true, "mustBeReduced": false, "maxValue": "{cof13}", "customName": "", "variableReplacements": [], "unitTests": [], "allowFractions": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "showCorrectAnswer": true, "marks": "0.2", "scripts": {}}, {"customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "{cof21}", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "showFractionHint": true, "mustBeReduced": false, "maxValue": "{cof21}", "customName": "", "variableReplacements": [], "unitTests": [], "allowFractions": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "showCorrectAnswer": true, "marks": "0.2", "scripts": {}}, {"customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "{cof22}", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "showFractionHint": true, "mustBeReduced": false, "maxValue": "{cof22}", "customName": "", "variableReplacements": [], "unitTests": [], "allowFractions": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "showCorrectAnswer": true, "marks": "0.2", "scripts": {}}, {"customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "{cof23}", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "showFractionHint": true, "mustBeReduced": false, "maxValue": "{cof23}", "customName": "", "variableReplacements": [], "unitTests": [], "allowFractions": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "showCorrectAnswer": true, "marks": "0.2", "scripts": {}}, {"customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "{cof31}", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "showFractionHint": true, "mustBeReduced": false, "maxValue": "{cof31}", "customName": "", "variableReplacements": [], "unitTests": [], "allowFractions": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "showCorrectAnswer": true, "marks": "0.2", "scripts": {}}, {"customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "{cof32}", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "showFractionHint": true, "mustBeReduced": false, "maxValue": "{cof32}", "customName": "", "variableReplacements": [], "unitTests": [], "allowFractions": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "showCorrectAnswer": true, "marks": "0.2", "scripts": {}}, {"customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "{cof33}", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "showFractionHint": true, "mustBeReduced": false, "maxValue": "{cof33}", "customName": "", "variableReplacements": [], "unitTests": [], "allowFractions": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "showCorrectAnswer": true, "marks": "0.2", "scripts": {}}], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "marks": 0, "scripts": {}}, {"customName": "", "prompt": "

What is the determinant of A=$\\var{matrixA}$?

\n

[[0]]

", "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "adaptiveMarkingPenalty": 0, "type": "gapfill", "useCustomName": false, "sortAnswers": false, "gaps": [{"customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "det(matrixA)", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "showFractionHint": true, "mustBeReduced": false, "maxValue": "det(matrixA)", "customName": "", "variableReplacements": [], "unitTests": [], "allowFractions": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "showCorrectAnswer": true, "marks": "1", "scripts": {}}], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "marks": 0, "scripts": {}}, {"customName": "", "prompt": "

\n

What is the inverse of A=$\\var{matrixA}$? Cofactors will be accepted as fractions or correct to 2 decimal places.

\n

[[0]]

", "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "adaptiveMarkingPenalty": 0, "type": "gapfill", "useCustomName": false, "sortAnswers": false, "gaps": [{"precisionMessage": "You have not given your answer to the correct precision.", "numRows": "3", "correctAnswerFractions": false, "precisionPartialCredit": 0, "customMarkingAlgorithm": "", "adaptiveMarkingPenalty": 0, "type": "matrix", "numColumns": "3", "showFeedbackIcon": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "correctAnswer": "matrix([cof11/detA, cof21/detA, cof31/detA],\n [cof12/detA, cof22/detA, cof32/detA],\n [cof13/detA, cof23/detA, cof33/detA])", "allowResize": false, "customName": "", "markPerCell": false, "variableReplacements": [{"must_go_first": true, "variable": "cof11", "part": "p0g0"}, {"must_go_first": true, "variable": "cof12", "part": "p0g1"}, {"must_go_first": true, "variable": "cof13", "part": "p0g2"}, {"must_go_first": true, "variable": "cof21", "part": "p0g3"}, {"must_go_first": true, "variable": "cof22", "part": "p0g4"}, {"must_go_first": true, "variable": "cof23", "part": "p0g5"}, {"must_go_first": true, "variable": "cof31", "part": "p0g6"}, {"must_go_first": true, "variable": "cof32", "part": "p0g7"}, {"must_go_first": true, "variable": "cof33", "part": "p0g8"}, {"must_go_first": true, "variable": "detA", "part": "p1g0"}], "unitTests": [], "tolerance": "0.005", "allowFractions": false, "variableReplacementStrategy": "originalfirst", "precisionType": "dp", "showCorrectAnswer": true, "precision": "2", "marks": 1, "strictPrecision": true, "scripts": {}}], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "marks": 0, "scripts": {}}], "advice": "

If \\[  A=\\left( \\begin{array}{ccc}
a & b & c \\\\d & e&f\\\\ g&h&j \\end{array} \\right),\\]

\n

Cofactors are given by \\[  A=\\left( \\begin{array}{ccc}
a & b & c \\\\d & e&f\\\\ g&h&j \\end{array} \\right),\\]

\n

Cof11 =\\[  +\\left| \\begin{array}{ccc}
e&f\\\\ h&j \\end{array} \\right|,\\]

\n

Cof12 =\\[  -\\left| \\begin{array}{ccc}
d & f\\\\ g&j \\end{array} \\right|,\\]

\n

Cof13 =\\[  +\\left| \\begin{array}{ccc}
d & e\\ g&h\\end{array} \\right|,\\]

\n

Cof21 =\\[ -\\left| \\begin{array}{ccc}
b & c \\\\h&j \\end{array} \\right|,\\]

\n

Cof22 =\\[  +\\left| \\begin{array}{ccc}
a  & c \\\\ g&j \\end{array} \\right|,\\]

\n

Cof23 =\\[  -\\left| \\begin{array}{ccc}
a & b \\\\g&h\\end{array} \\right|,\\]

\n

Cof31 =\\[  +=\\left| \\begin{array}{ccc}
b & c \\\\e&f\\end{array} \\right|,\\]

\n

Cof32 =\\[ -\\left| \\begin{array}{ccc}
a  & c \\\\d & f\\end{array} \\right|,\\]

\n

Cof33 =\\[  +\\left| \\begin{array}{ccc}
a & b\\\\d & e \\end{array} \\right|,\\]

\n

Then, the determinant of A is given by the sum of the product of any row ( or column) elements by their cofactors

\n

e.g row 1 determinant = a*cof11+b*cof12+c*cof13

\n

and the inverse of A is given by the ratio of the adjoint(A) and the deteminant of A

\n

where adjoint A= \\left( \\begin{array}{ccc}
cof11 & cof21 & cof31 \\\\cof12 & cof22&cof32\\\\ cof13&cof23&cof33 \\end{array} \\right),\\]

\n

  inverse of A=\\[  \\frac{1}{det(A)}*\\left( \\begin{array}{ccc}
cof11 & cof21 & cof31 \\\\cof12 & cof22&cof32\\\\ cof13&cof23&cof33 \\end{array} \\right),\\]

\n

 

\n

"}, {"name": "MATH6005 T7Q8", "extensions": [], "custom_part_types": [], "resources": [["question-resources/numbas_pic3.JPG", "/srv/numbas/media/question-resources/numbas_pic3.JPG"], ["question-resources/numbas_pic3a.JPG", "/srv/numbas/media/question-resources/numbas_pic3a.JPG"], ["question-resources/hint1.JPG", "/srv/numbas/media/question-resources/hint1.JPG"], ["question-resources/hint2.JPG", "/srv/numbas/media/question-resources/hint2.JPG"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

The frame below is subjected to a horizontal force $\\mathbf{\\underline{F}}=400 \\mathbf{\\widehat{i}} \\; N$ acting at its corner. Calculate the magnitude of the component along the arm $AB$ of the frame. 

\n

\n

Give your answer correct to 3 significant figures.

", "advice": "", "rulesets": {}, "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "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": "

$F_{AB} = $ [[0]]

", "stepsPenalty": "1", "steps": [{"type": "information", "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": "

Note that the angle between the arm $AB$ and the force $\\mathbf{\\underline{F}}$ is also $20^{\\circ}$ as shown below (corresponding angles).

\n

This gives rise to the following right-angled triangle, where we wish to find $F_{AB}$.

\n

\n

Relative to the angle of $20^{\\circ}$, which side is $F_{AB}$? What trigonometric function links this side to the hypotenuse?

"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "376", "maxValue": "376", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": "0", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "MATH6005 T8Q3", "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/"}], "parts": [{"marks": 0, "customMarkingAlgorithm": "", "scripts": {}, "unitTests": [], "stepsPenalty": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "steps": [{"variableReplacements": [], "prompt": "

Either of the following would get full marks for the definition of the vector product:

\n

Option 1:

\n

The vector product (or cross product) of two vectors $\\mathbf{\\underline{u}}=(u_1, u_2, u_3) $  and $\\mathbf{\\underline{v}}=(v_1, v_2, v_3)$ in $\\mathbb{R}^3$ is the vector given by

\n

\\[ \\mathbf{\\underline{u}} \\times \\mathbf{\\underline{v}} = \\left| \\begin{matrix} \\mathbf{\\widehat{i}} & \\mathbf{\\widehat{j}} & \\mathbf{\\widehat{k}} \\\\ u_1 & u_2 & u_3 \\\\ v_1 & v_2 & v_3 \\end{matrix} \\right| \\]

\n

The vector $\\mathbf{\\underline{u}} \\times \\mathbf{\\underline{v}}$ is perpendicular to the plane containing both $\\mathbf{\\underline{u}}$ and $\\mathbf{\\underline{v}}$ and its direction is given by the right hand rule.

\n

or

\n

Option 2:

\n

For two vectors $\\mathbf{\\underline{u}}, \\mathbf{\\underline{v}} \\in \\mathbb{R}^3$, the vector product (or cross product) $\\mathbf{\\underline{u}} \\times \\mathbf{\\underline{v}}$ is a vector whose magnitude is given by 

\n

\\[ |\\mathbf{\\underline{u}} \\times \\mathbf{\\underline{v}}| = |\\mathbf{\\underline{u}}| |\\mathbf{\\underline{u}}| \\sin \\theta \\]

\n

where $\\theta$ is the angle between $\\mathbf{\\underline{u}}$ and $\\mathbf{\\underline{v}}$. 

\n

The vector $\\mathbf{\\underline{u}} \\times\\mathbf{\\underline{v}}$ is perpendicular to the plane containing both $\\mathbf{\\underline{u}}$ and $\\mathbf{\\underline{v}}$ and its direction is given by the right hand rule.

\n

\n

Geometric Interpretation:

\n

The magnitude of $\\mathbf{\\underline{u}} \\times \\mathbf{\\underline{v}}$ is the area of the parallelogram defined by the vectors $\\mathbf{\\underline{u}}$ and $\\mathbf{\\underline{v}}$.

", "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "unitTests": [], "marks": 0, "type": "information", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true}], "type": "information", "showCorrectAnswer": true}], "rulesets": {}, "statement": "

Using a pen and paper, define the vector product of two vectors.

\n

Give a geometric interpretation of the vector product.

\n

Click on the show steps button below to check your answer.

", "metadata": {"licence": "None specified", "description": ""}, "ungrouped_variables": [], "variable_groups": [], "variables": {}, "advice": "", "tags": [], "preamble": {"js": "", "css": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}, "type": "question"}]}], "percentPass": 0, "name": "Numbas Demo Feb 2019", "feedback": {"showactualmark": true, "feedbackmessages": [], "intro": "", "showtotalmark": true, "advicethreshold": 0, "allowrevealanswer": true, "showanswerstate": true}, "showQuestionGroupNames": false, "duration": 0, "navigation": {"browse": true, "showresultspage": "oncompletion", "allowregen": true, "onleave": {"action": "none", "message": ""}, "showfrontpage": true, "reverse": true, "preventleave": true}, "type": "exam", "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}], "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": [["question-resources/image_K0BP3FV.png", "/srv/numbas/media/question-resources/image_K0BP3FV.png"], ["question-resources/image_jS71fGY.png", "/srv/numbas/media/question-resources/image_jS71fGY.png"], ["question-resources/image_8rDGI2c.png", "/srv/numbas/media/question-resources/image_8rDGI2c.png"], ["question-resources/image_AgeDfYh.png", "/srv/numbas/media/question-resources/image_AgeDfYh.png"], ["question-resources/numbas_pic3.JPG", "/srv/numbas/media/question-resources/numbas_pic3.JPG"], ["question-resources/numbas_pic3a.JPG", "/srv/numbas/media/question-resources/numbas_pic3a.JPG"], ["question-resources/hint1.JPG", "/srv/numbas/media/question-resources/hint1.JPG"], ["question-resources/hint2.JPG", "/srv/numbas/media/question-resources/hint2.JPG"]]}