// Numbas version: exam_results_page_options {"name": "Integral of a graph. Version II", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

A graph is drawn. A student is to identify the derivative of this graph from four other graphs.

\n

Version I. Graph is quadratic

\n

Version II. Graph is horizontal

\n

Version III. Graph is cubic

\n

Version IV. Graph is sinusoidal

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "extensions": ["jsxgraph"], "functions": {"plot": {"type": "html", "definition": "// This function creates the board and sets it up, then returns an\n// HTML div tag containing the board.\n\n//Put in your values of x here\n\nvar x_min = -4;\nvar x_max = 4;\nvar y_min = -6;\nvar y_max = 6;\n\n\n// First, make the JSXGraph board.\n// The function provided by the JSXGraph extension wraps the board up in \n// a div tag so that it's easier to embed in the page.\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n//{boundingBox: [-8,10,8,-10],\n {boundingBox: [x_min,y_max,x_max,y_min], \n axis: false,\n showNavigation: false,\n grid: true\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.\nvar xaxis = board.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = board.create('ticks',[xaxis,1],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\nvar yticks = board.create('ticks',[yaxis,1],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n\n // PUT YOUR FUNCTION HERE\n\nm3 = m+Math.floor(Math.random()*2)*2-1; //Same as random(-1..1#2)\nm4 = m+Math.floor(Math.random()*2)*4-2; //Same as random(-2..2#4)\nm5 = m+Math.floor(Math.random()*2)*6-3; //Same as random(-3..3#6)\n\nc2 = Math.floor(Math.random()*6)-3; //Same as random(-3..2)\nc3 = Math.floor(Math.random()*6)-3; //Same as random(-3..2)\nc4 = Math.floor(Math.random()*6)-3; //Same as random(-3..2)\nc5 = Math.floor(Math.random()*6)-3; //Same as random(-3..2)\n\nif(n==1)\n board.create('functiongraph',[function(x){ return m;},x_min,x_max]);\nelse if (n==2)\n board.create('functiongraph',[function(x){ return m*x+c2;},x_min,x_max]);\nelse if (n==3)\n board.create('functiongraph',[function(x){ return m3*x+c3;},x_min,x_max]);\nelse if (n==4)\n board.create('functiongraph',[function(x){ return m4*x+c4;},x_min,x_max]);\nelse if (n==5)\n board.create('functiongraph',[function(x){ return m5*x+c5;},x_min,x_max]);\n\nreturn div;", "language": "javascript", "parameters": [["n", "number"], ["m", "number"], ["c", "number"]]}}, "ungrouped_variables": ["m", "c"], "name": "Integral of a graph. Version II", "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "variables": {"m": {"name": "m", "definition": "random(-3..3 except 0)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "c": {"name": "c", "definition": "random(-2..2#0.5)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}}, "statement": "", "parts": [{"showFeedbackIcon": true, "type": "1_n_2", "customMarkingAlgorithm": "", "maxMarks": "2", "variableReplacementStrategy": "originalfirst", "marks": 0, "unitTests": [], "displayColumns": 0, "minMarks": 0, "distractors": ["", "", "", ""], "shuffleChoices": true, "scripts": {}, "variableReplacements": [], "displayType": "radiogroup", "choices": ["

{plot(2,{m},{c})}

", "

{plot(3,{m},{c})}

", "

{plot(4,{m},{c})}

", "

{plot(5,{m},{c})}

"], "showCorrectAnswer": true, "prompt": "

Here is the graph of $f'$.

\n

{plot(1,{m},{c})}

\n

Which of the graphs below could be the graph of $f$?

\n

              

", "matrix": ["2", "0", 0, 0], "extendBaseMarkingAlgorithm": true}], "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/"}]}