// Numbas version: exam_results_page_options {"name": "solving equations graphically. Version 1", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "solving equations graphically. Version 1", "statement": "

If a question has more than one answer, increase the number of COLUMNS and list your answers in ASCENDING ORDER.

", "ungrouped_variables": [], "extensions": ["jsxgraph"], "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Simple procedures are given and student is asked to carry them out or un-do them.

\n

Version 1: bi and bii have the same answer. biii and biv both have two answers.

\n

Version 2: bi and bii have different answers. biii has two answers, biv has one answer.

\n

Version 3: bi and bii have different answer. biii has one answer, biv has two answers.

\n

Version 4: bi and bii have the same answer. biii has one answer, biv has two answers.

"}, "variable_groups": [{"variables": ["add2", "sub2", "ymax", "ymin", "shift", "gy"], "name": "part a"}], "functions": {"eqnline": {"type": "html", "parameters": [["a", "number"], ["b", "number"]], "language": "javascript", "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;"}}, "variables": {"ymin": {"templateType": "anything", "name": "ymin", "group": "part a", "description": "", "definition": "vector(-add2,-add2,-add2)-shift"}, "ymax": {"templateType": "anything", "name": "ymax", "group": "part a", "description": "", "definition": "vector(-add2,-add2,-add2)+shift"}, "add2": {"templateType": "anything", "name": "add2", "group": "part a", "description": "", "definition": "random(1..5)"}, "gy": {"templateType": "anything", "name": "gy", "group": "part a", "description": "", "definition": "vector((ymax[0]+add2)^2-sub2,(ymax[1]+add2)^2-sub2,(ymax[2]+add2)^2-sub2)"}, "sub2": {"templateType": "anything", "name": "sub2", "group": "part a", "description": "", "definition": "random(1..3)"}, "shift": {"templateType": "anything", "name": "shift", "group": "part a", "description": "", "definition": "vector(shuffle(1..3))"}}, "tags": [], "parts": [{"variableReplacements": [], "customMarkingAlgorithm": "", "type": "gapfill", "gaps": [{"variableReplacements": [], "minValue": "gy[0]", "type": "numberentry", "maxValue": "gy[0]", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "correctAnswerStyle": "plain", "correctAnswerFraction": false, "mustBeReducedPC": 0, "showFeedbackIcon": true, "mustBeReduced": false, "allowFractions": false, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "scripts": {}, "customMarkingAlgorithm": "", "marks": "1"}, {"variableReplacements": [], "minValue": "gy[0]", "type": "numberentry", "maxValue": "gy[0]", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "correctAnswerStyle": "plain", "correctAnswerFraction": false, "mustBeReducedPC": 0, "showFeedbackIcon": true, "mustBeReduced": false, "allowFractions": false, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "scripts": {}, "customMarkingAlgorithm": "", "marks": "1"}, {"numRows": 1, "variableReplacements": [], "correctAnswerFractions": false, "markPerCell": false, "type": "matrix", "tolerance": 0, "allowResize": true, "showCorrectAnswer": true, "correctAnswer": "matrix([ymin[1],ymax[1]])", "variableReplacementStrategy": "originalfirst", "numColumns": "1", "customMarkingAlgorithm": "", "allowFractions": false, "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "marks": 1}, {"numRows": 1, "variableReplacements": [], "correctAnswerFractions": false, "markPerCell": false, "type": "matrix", "tolerance": 0, "allowResize": true, "showCorrectAnswer": true, "correctAnswer": "matrix([ymin[2],ymax[2]])", "variableReplacementStrategy": "originalfirst", "numColumns": "1", "customMarkingAlgorithm": "", "allowFractions": false, "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "marks": 1}], "variableReplacementStrategy": "originalfirst", "unitTests": [], "sortAnswers": false, "showFeedbackIcon": true, "prompt": "

\n

Below is the graph of a function $f(x)$.

\n

{eqnline(add2,sub2)}

\n

\n

What is $f(\\var{ymax[0]})$? [[0]]

\n

What is  $f(\\var{ymin[0]})$? [[1]]

\n

Solve the equation $f(x)=\\var{gy[1]}$?

\n

[[2]]

\n

\n

Solve $f(x) = \\var{gy[2]}$?

\n

[[3]]

\n

", "showCorrectAnswer": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"css": "", "js": ""}, "rulesets": {}, "advice": "", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}