// Numbas version: exam_results_page_options {"name": "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": [{"variable_groups": [], "ungrouped_variables": ["a", "hshift", "vshift", "x1", "x2", "y1", "y2"], "variablesTest": {"condition": "max(abs(y1),abs(y2))<10", "maxRuns": 100}, "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.

", "tags": [], "extensions": ["geogebra", "jsxgraph"], "parts": [{"scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "minAnswers": "2", "type": "m_n_2", "displayColumns": 0, "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.

"], "displayType": "checkbox", "matrix": ["1", "-1", "-1", "1", "-1", "1", "-1"], "warningType": "none", "maxAnswers": 0, "shuffleChoices": true, "showFeedbackIcon": true, "marks": 0, "maxMarks": 0, "prompt": "

{eqnline(a, hshift, vshift)}

\n

\n

", "distractors": ["", "", "", "", "", "", ""], "minMarks": 0, "showCorrectAnswer": true}], "functions": {"eqnline": {"language": "javascript", "parameters": [["a", "number"], ["h", "number"], ["v", "number"]], "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;", "type": "html"}}, "variables": {"a": {"definition": "random(-1..1 except 0)", "templateType": "anything", "name": "a", "group": "Ungrouped variables", "description": "

Coefficient of x^3

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

Random amount of horizontal shift to create variability.

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

Random amount of vertifical shift for sake of variability.

"}, "x2": {"definition": "random(-1..1 except x1)", "templateType": "anything", "name": "x2", "group": "Ungrouped variables", "description": ""}, "y1": {"definition": "a*((x1+hshift)^3+(x1+hshift)+vshift)", "templateType": "anything", "name": "y1", "group": "Ungrouped variables", "description": ""}}, "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "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.

"}, "statement": "

Select the true statements about the following graph.

\n

(You may select more than one option).

", "preamble": {"js": "", "css": ""}, "name": "Function graph 1", "type": "question", "contributors": [{"name": "Adrian Jannetta", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/164/"}]}]}], "contributors": [{"name": "Adrian Jannetta", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/164/"}]}