// 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}, "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