// Numbas version: exam_results_page_options {"name": "JD's copy of Function graph 1", "extensions": ["geogebra", "jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": ["geogebra", "jsxgraph"], "functions": {"eqnline": {"language": "javascript", "definition": "// This functions plots a cubic with a certain number of\n// stationary points and roots.\n// It creates the board, sets it up, then returns an\n// HTML div tag containing the board.\n\n\n// Max and min x and y values for the axis.\nvar x_min = -6;\nvar x_max = 6;\nvar y_min = -10;\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.\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// Plot the function.\n board.create('functiongraph',\n [function(x){ return a*(Math.pow(x+h,3)+(x+h)+v);},x_min,x_max]);\n\nreturn div;", "parameters": [["a", "number"], ["h", "number"], ["v", "number"]], "type": "html"}}, "preamble": {"js": "", "css": ""}, "variables": {"a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-1..1 except 0)", "name": "a", "description": "

Coefficient of x^3

"}, "y2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "a*((x2+hshift)^3+(x2+hshift)+vshift)", "name": "y2", "description": ""}, "hshift": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-2..2)", "name": "hshift", "description": "

Random amount of horizontal shift to create variability.

"}, "x2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-1..1 except x1)", "name": "x2", "description": ""}, "vshift": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-2..2)", "name": "vshift", "description": "

Random amount of vertifical shift for sake of variability.

"}, "x1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0..1)", "name": "x1", "description": ""}, "y1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "a*((x1+hshift)^3+(x1+hshift)+vshift)", "name": "y1", "description": ""}}, "metadata": {"description": "

Given a graph of some line or curve - the student is asked about the nature of the map and whether it constitutes a function.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Select the true statements about the following graph.

\n

(You may select more than one option).

", "advice": "

Each value on the domain is mapped to one value in the range; this is a function!

\n

Only one value in the domain will map to a particular point in the range; this is a one-to-one map.

", "variable_groups": [], "rulesets": {}, "name": "JD's copy of Function graph 1", "ungrouped_variables": ["a", "hshift", "vshift", "x1", "x2", "y1", "y2"], "tags": [], "parts": [{"matrix": ["1", "-1", "-1", "1", "-1", "1", "-1"], "scripts": {}, "marks": 0, "maxAnswers": 0, "distractors": ["", "", "", "", "", "", ""], "warningType": "none", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "maxMarks": 0, "shuffleChoices": true, "type": "m_n_2", "choices": ["

One-to-one map

", "

Many-to-one map

", "

One-to-many map

", "

This graph is a function.

", "

This graph is not  a function.

", "

Inverse function exists.

", "

Inverse function does not exist.

"], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

{eqnline(a, hshift, vshift)}

\n

\n

", "minAnswers": "2", "displayType": "checkbox", "displayColumns": 0, "minMarks": 0}], "variablesTest": {"condition": "max(abs(y1),abs(y2))<10", "maxRuns": 100}, "type": "question", "contributors": [{"name": "Adrian Jannetta", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/164/"}, {"name": "JD Ichwan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3389/"}]}]}], "contributors": [{"name": "Adrian Jannetta", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/164/"}, {"name": "JD Ichwan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3389/"}]}