// Numbas version: exam_results_page_options {"name": "slope of graph multi choice", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"eqndiff": {"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 = -2*3.14159;\nvar x_max = 2*3.14159;\nvar y_min = -1.1;\nvar y_max = 1.1;\n\nn=n%4;\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('100px','100px',\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: false,\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: false,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n\n // PUT YOUR FUNCTION HERE\n\n\nif(n==1)\n board.create('functiongraph',[function(x){ return Math.cos(x);},x_min,x_max]);\nelse if (n==2)\n board.create('functiongraph',[function(x){ return -Math.sin(x);},x_min,x_max]);\nelse if (n==3)\n board.create('functiongraph',[function(x){ return -Math.cos(x);},x_min,x_max]);\nelse if (n==0)\n board.create('functiongraph',[function(x){ return Math.sin(x);},x_min,x_max]);\n\nreturn div;", "type": "html", "language": "javascript", "parameters": [["n", "number"]]}}, "ungrouped_variables": ["n", "answer"], "name": "slope of graph multi choice", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

{eqndiff(n+1)}

", "rulesets": {}, "parts": [{"displayColumns": 0, "matrix": [0, "2", 0, 0], "shuffleChoices": true, "variableReplacements": [], "choices": ["

{eqndiff(n)}

", "

{eqndiff(n+1)}

", "

{eqndiff(n+2)}

", "

{eqndiff(n+3)}

"], "variableReplacementStrategy": "originalfirst", "maxMarks": "2", "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}], "extensions": ["jsxgraph"], "statement": "

{eqndiff(n)}

\n

Select the graph that shows the differential of of the graph above.

\n

              

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"answer": {"definition": "mod((n+1),4)", "templateType": "anything", "group": "Ungrouped variables", "name": "answer", "description": ""}, "n": {"definition": "random(1..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}}, "metadata": {"description": "

Choose the graph that represents the differential of the given graph

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Paul Howes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/632/"}]}]}], "contributors": [{"name": "Paul Howes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/632/"}]}