// Numbas version: exam_results_page_options {"name": "Gizem's example for multiple answers to a question", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "", "tags": [], "variables": {"x": {"group": "part a", "description": "", "name": "x", "templateType": "anything", "definition": "[ matrix([-a]),\n matrix([[-1-a],[1-a]]),\n matrix([[-2-a],[2-a]]),\n matrix([[-3-a],[3-a]])\n]"}, "rand": {"group": "part a", "description": "", "name": "rand", "templateType": "anything", "definition": "shuffle(0..3)"}, "b": {"group": "part a", "description": "", "name": "b", "templateType": "anything", "definition": "random(1..3)"}, "a": {"group": "part a", "description": "", "name": "a", "templateType": "anything", "definition": "random(1..5)"}, "y": {"group": "part a", "description": "", "name": "y", "templateType": "anything", "definition": "[-b,-b+1,-b+4,-b+9]"}}, "ungrouped_variables": [], "variablesTest": {"condition": "", "maxRuns": 100}, "name": "Gizem's example for multiple answers to a question", "functions": {"plot": {"definition": "// This functions plots a quadratic graph of the form y = (x+a)^2 - b\n\n\n// Max and min x and y values for the axis.\nvar x_min = -10;\nvar x_max = 4;\nvar y_min = -6;\nvar y_max = 10;\n\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '500px',\n '600px',\n {\n boundingBox: [x_min,y_max,x_max,y_min],\n axis: false,\n showNavigation: true,\n grid: true\n }\n);\n\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar board = div.board; \n\n// create the x-axis and y-axis\nvar xaxis = board.create('axis',[[0,0],[1,0]]);\n\n// create the y-axis\nvar yaxis = board.create('axis',[[0,0],[0,1]], );\n\n\n\n\n// Plot the function.\n board.create('functiongraph',\n [function(x){ return (x+a)*(x+a)-b},x_min,x_max]);\n\n\n\nreturn div;", "parameters": [["a", "number"], ["b", "number"]], "type": "html", "language": "javascript"}}, "parts": [{"sortAnswers": false, "prompt": "

Below is the graph of the function $h$.

\n

{plot(a,b)}

\n

\n

Use the graph to solve the following equations. If there is more than one answer, increase the number of rows and enter the answers in ascending order.

\n

\n

$h(a)=\\var{y[rand[0]]}$

\n

[[0]]

\n

\n

\n

$h(b)=\\var{y[rand[1]]}$

\n

[[1]]

\n

\n

\n

$h(c)=\\var{y[rand[2]]}$

\n

[[2]]

\n

", "customMarkingAlgorithm": "", "gaps": [{"numRows": 1, "markPerCell": false, "correctAnswerFractions": false, "customMarkingAlgorithm": "", "marks": 1, "allowFractions": false, "unitTests": [], "extendBaseMarkingAlgorithm": true, "correctAnswer": "x[rand[0]]", "allowResize": true, "showFeedbackIcon": true, "numColumns": "1", "scripts": {}, "type": "matrix", "showCorrectAnswer": true, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": []}, {"numRows": 1, "markPerCell": false, "correctAnswerFractions": false, "customMarkingAlgorithm": "", "marks": 1, "allowFractions": false, "unitTests": [], "extendBaseMarkingAlgorithm": true, "correctAnswer": "x[rand[1]]", "allowResize": true, "showFeedbackIcon": true, "numColumns": "1", "scripts": {}, "type": "matrix", "showCorrectAnswer": true, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": []}, {"numRows": 1, "markPerCell": false, "correctAnswerFractions": false, "customMarkingAlgorithm": "", "marks": 1, "allowFractions": false, "unitTests": [], "extendBaseMarkingAlgorithm": true, "correctAnswer": "x[rand[2]]", "allowResize": true, "showFeedbackIcon": true, "numColumns": "1", "scripts": {}, "type": "matrix", "showCorrectAnswer": true, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": []}], "unitTests": [], "marks": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "type": "gapfill", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "variableReplacements": []}], "metadata": {"description": "

A (quadratic) function is skethed sketched. Three equations are given that can be solved using the graph. There is a chance there will only be one solution.

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "extensions": ["jsxgraph"], "variable_groups": [{"variables": ["a", "b", "y", "x", "rand"], "name": "part a"}], "preamble": {"css": "", "js": ""}, "advice": "

See 5.3 and 5.5 for background on functions. See earlier lectures for meaning of equations and solving of equations.

", "type": "question", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Gizem Intepe", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2097/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Gizem Intepe", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2097/"}]}