// Numbas version: exam_results_page_options {"metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "showstudentname": true, "name": "06C maths - Session 2: Functions part 1", "showQuestionGroupNames": false, "percentPass": 0, "duration": 0, "timing": {"allowPause": true, "timedwarning": {"action": "none", "message": ""}, "timeout": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "feedbackmessages": [], "advicethreshold": 0, "intro": "", "showtotalmark": true, "allowrevealanswer": true, "showanswerstate": true}, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questions": [{"name": "Evaluating linear functions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}], "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "tags": [], "ungrouped_variables": ["a", "b"], "functions": {}, "variable_groups": [], "parts": [{"unitTests": [], "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "mustBeReduced": false, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "maxValue": "1*{a}+{b}", "type": "numberentry", "marks": "1", "showFeedbackIcon": true, "allowFractions": false, "correctAnswerFraction": false, "scripts": {}, "minValue": "1*{a}+{b}", "customMarkingAlgorithm": "", "prompt": "

\n

$f(1) = $ 

"}, {"unitTests": [], "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "mustBeReduced": false, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "maxValue": "-2*{a}+{b}", "type": "numberentry", "marks": 1, "showFeedbackIcon": true, "allowFractions": false, "correctAnswerFraction": false, "scripts": {}, "minValue": "-2*{a}+{b}", "customMarkingAlgorithm": "", "prompt": "

$f(-2)=$

"}, {"unitTests": [], "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "mustBeReduced": false, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "maxValue": "{b}", "type": "numberentry", "marks": 1, "showFeedbackIcon": true, "allowFractions": false, "correctAnswerFraction": false, "scripts": {}, "minValue": "{b}", "customMarkingAlgorithm": "", "prompt": "

$f(0)=$

"}, {"vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "jme", "marks": 1, "failureRate": 1, "showFeedbackIcon": true, "checkVariableNames": false, "expectedVariableNames": [], "answer": "{a}*K+{b}", "scripts": {}, "customMarkingAlgorithm": "", "prompt": "

$f(K)=$

", "showPreview": true}, {"vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "unitTests": [], "showCorrectAnswer": false, "variableReplacements": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "jme", "marks": "2", "failureRate": 1, "showFeedbackIcon": true, "checkVariableNames": false, "expectedVariableNames": [], "answer": "{a}*K+{a+b}", "scripts": {}, "customMarkingAlgorithm": "", "prompt": "

$f(K+1)=$

", "showPreview": true}, {"vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "jme", "marks": "2", "failureRate": 1, "showFeedbackIcon": true, "checkVariableNames": false, "expectedVariableNames": [], "answer": "{a}/2*K+{b}", "scripts": {}, "customMarkingAlgorithm": "", "prompt": "

$f(K/2)=$

", "showPreview": true}, {"vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "jme", "marks": "2", "failureRate": 1, "showFeedbackIcon": true, "checkVariableNames": false, "expectedVariableNames": [], "answer": "{a}*(x+z)+{b}", "scripts": {}, "customMarkingAlgorithm": "", "prompt": "

$f(x+z)=$

", "showPreview": true}], "metadata": {"description": "

evaluating functions of the form ax+b for different vaues of x; a and b random from 2..9

", "licence": "None specified"}, "preamble": {"js": "", "css": ""}, "statement": "

If $f(x) = \\var{a}x+\\var{b}$ what is:

", "advice": "", "variables": {"b": {"description": "", "name": "b", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9 except a)"}, "a": {"description": "", "name": "a", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..9)"}}, "type": "question"}, {"name": "Evaluating quadratic functions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}], "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "tags": [], "ungrouped_variables": ["a", "b", "c"], "functions": {}, "variable_groups": [], "parts": [{"unitTests": [], "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "mustBeReduced": false, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "maxValue": "{a}*4+{b}*2+{c}", "type": "numberentry", "marks": "2", "showFeedbackIcon": true, "allowFractions": false, "correctAnswerFraction": false, "scripts": {}, "minValue": "{a}*4+{b}*2+{c}", "customMarkingAlgorithm": "", "prompt": "

\n

$f(2) = $ 

"}, {"unitTests": [], "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "mustBeReduced": false, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "maxValue": "{a}*4+{b}*-2+{c}", "type": "numberentry", "marks": "2", "showFeedbackIcon": true, "allowFractions": false, "correctAnswerFraction": false, "scripts": {}, "minValue": "{a}*4+{b}*-2+{c}", "customMarkingAlgorithm": "", "prompt": "

$f(-2)=$

"}, {"unitTests": [], "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "mustBeReduced": false, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "maxValue": "{c}", "type": "numberentry", "marks": "2", "showFeedbackIcon": true, "allowFractions": false, "correctAnswerFraction": false, "scripts": {}, "minValue": "{c}", "customMarkingAlgorithm": "", "prompt": "

$f(0)=$

"}, {"unitTests": [], "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "mustBeReduced": false, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "maxValue": "{a}*0.25+{b}*0.5+{c}", "type": "numberentry", "marks": "2", "showFeedbackIcon": true, "allowFractions": false, "correctAnswerFraction": false, "scripts": {}, "minValue": "{a}*0.25+{b}*0.5+{c}", "customMarkingAlgorithm": "", "prompt": "

$f(1/2)=$

"}, {"vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "jme", "marks": "2", "failureRate": 1, "showFeedbackIcon": true, "checkVariableNames": false, "expectedVariableNames": [], "answer": "{a}*y^2+(2*{a}+{b})*y+{a}+{b}+{c}", "scripts": {}, "customMarkingAlgorithm": "", "prompt": "

$f(1+y)=$

", "showPreview": true}], "metadata": {"description": "

evaluating functions of the form ax^2+bx+c for different vaues of x; a, b and c random from -3..5

", "licence": "None specified"}, "preamble": {"js": "", "css": ""}, "statement": "

If $f(x) = \\simplify{{a}x^2+{b}x+{c}}$ what is:

", "advice": "", "variables": {"a": {"description": "", "name": "a", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(-3..5)"}, "c": {"description": "", "name": "c", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(-2..5)"}, "b": {"description": "", "name": "b", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(-2..5)"}}, "type": "question"}, {"name": "3. Combining functions ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}], "functions": {}, "ungrouped_variables": ["a", "b"], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"vsetrangepoints": 5, "prompt": "

$f(g(x))$

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{a}*x^2+{b}", "marks": "2", "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"vsetrangepoints": 5, "prompt": "

$g(f(x))$

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{a}^2*x^2+2*{a}*{b}*x+{b}^2", "marks": "2", "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"vsetrangepoints": 5, "prompt": "

$f(f(x))$

", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{a}^2*x+{a}*{b}+{b}", "marks": "2", "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"prompt": "

$f(g(2))$

", "allowFractions": false, "variableReplacements": [], "maxValue": "4*{a}+{b}", "minValue": "4*{a}+{b}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "2", "type": "numberentry", "showPrecisionHint": false}, {"prompt": "

$g(f(-1)$

", "allowFractions": false, "variableReplacements": [], "maxValue": "{a}^2-2*{a}*{b}+{b}^2", "minValue": "{a}^2-2*{a}*{b}+{b}^2", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "2", "type": "numberentry", "showPrecisionHint": false}], "statement": "

If $f(x) = \\simplify{{a}x+{b}}$ and $g(x) = x^2$, what is:

\n

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(-3..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "random(-3..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}}, "metadata": {"notes": "

f(x) = ax+b, g(x) = x^2 example where a and b are random from a set

", "description": "

Simple examples combining functions

", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "4. More combining functions ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}], "functions": {}, "metadata": {"licence": "None specified", "notes": "

f(x) = x^2, g(x) = a/(b+x) example where a and b are random from a set

", "description": "

Simple examples combining functions

"}, "statement": "

If $f(x) = x^2 $ and $g(x) = \\frac{ \\var{a}}{\\simplify{{b}+x}}$, what is: 

", "tags": [], "type": "question", "variables": {"a": {"name": "a", "group": "Ungrouped variables", "description": "", "definition": "random(-3..5)", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "description": "", "definition": "random(-3..5)", "templateType": "anything"}}, "question_groups": [{"name": "", "questions": [], "pickQuestions": 0, "pickingStrategy": "all-ordered"}], "preamble": {"css": "", "js": ""}, "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": ["a", "b"], "parts": [{"checkvariablenames": false, "variableReplacements": [], "answer": "{a}/({b}+x^2)", "showCorrectAnswer": true, "prompt": "

$g(f(x))$

", "vsetrange": [0, 1], "checkingtype": "absdiff", "vsetrangepoints": 5, "checkingaccuracy": 0.001, "marks": "2", "expectedvariablenames": [], "showpreview": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "scripts": {}}, {"checkvariablenames": false, "variableReplacements": [], "answer": "{a}^2/({b}^2+2*{b}*x+x^2)", "showCorrectAnswer": true, "prompt": "

$f(g(x))$

", "vsetrange": [0, 1], "checkingtype": "absdiff", "vsetrangepoints": 5, "checkingaccuracy": 0.001, "marks": "2", "expectedvariablenames": [], "showpreview": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "scripts": {}}, {"checkvariablenames": false, "variableReplacements": [], "answer": "x^4", "showCorrectAnswer": true, "prompt": "

$f(f(x))$

", "vsetrange": [0, 1], "checkingtype": "absdiff", "vsetrangepoints": 5, "checkingaccuracy": 0.001, "marks": "2", "expectedvariablenames": [], "showpreview": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "scripts": {}}, {"variableReplacements": [], "maxValue": "{a}^2/({b}^2+6*{b}+9)", "allowFractions": true, "correctAnswerFraction": true, "showCorrectAnswer": true, "minValue": "{a}^2/({b}^2+6*{b}+9)", "prompt": "

$f(g(3))$

", "marks": "2", "showPrecisionHint": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "scripts": {}}, {"variableReplacements": [], "maxValue": "{a}/({b}+1)", "allowFractions": true, "correctAnswerFraction": true, "showCorrectAnswer": true, "minValue": "{a}/({b}+1)", "prompt": "

$g(f(-1)$

", "marks": "2", "showPrecisionHint": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "scripts": {}}], "variable_groups": [], "showQuestionGroupNames": false, "rulesets": {}, "advice": ""}, {"name": "Inverse of a function", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}], "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "tags": [], "ungrouped_variables": ["a", "b", "c", "d", "g", "f"], "functions": {}, "variable_groups": [], "parts": [{"vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "jme", "marks": 1, "failureRate": 1, "showFeedbackIcon": true, "checkVariableNames": false, "expectedVariableNames": [], "answer": "(x-{b})/{a}", "scripts": {}, "customMarkingAlgorithm": "", "prompt": "

$f(x)=\\var{a}x+\\var{b}$

", "showPreview": true}, {"vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "jme", "marks": 1, "failureRate": 1, "showFeedbackIcon": true, "checkVariableNames": false, "expectedVariableNames": [], "answer": "(x+{d})/{c}", "scripts": {}, "customMarkingAlgorithm": "", "prompt": "

$f(x)=\\var{c}x-\\var{d}$

", "showPreview": true}, {"vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "unitTests": [], "showCorrectAnswer": false, "variableReplacements": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "jme", "marks": "2", "failureRate": 1, "showFeedbackIcon": true, "checkVariableNames": false, "expectedVariableNames": [], "answer": "((x-{f})/{g})^(1/2)", "scripts": {}, "customMarkingAlgorithm": "", "prompt": "

$f(x)=\\var{g}x^2+\\var{f}$

", "showPreview": true}, {"vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "jme", "marks": 1, "failureRate": 1, "showFeedbackIcon": true, "checkVariableNames": false, "expectedVariableNames": [], "answer": "{b}/x", "scripts": {}, "customMarkingAlgorithm": "", "prompt": "

$f(x)=\\frac{\\var{b}}{x}$

", "showPreview": true}, {"vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "jme", "marks": 1, "failureRate": 1, "showFeedbackIcon": true, "checkVariableNames": false, "expectedVariableNames": [], "answer": "x^2", "scripts": {}, "customMarkingAlgorithm": "", "prompt": "

$f(x)=\\sqrt x$

", "showPreview": true}, {"vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "jme", "marks": "2", "failureRate": 1, "showFeedbackIcon": true, "checkVariableNames": false, "expectedVariableNames": [], "answer": "x^{c}", "scripts": {}, "customMarkingAlgorithm": "", "prompt": "

$f(x)=x^\\var{1/c}$

", "showPreview": true}, {"vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "type": "jme", "marks": "2", "failureRate": 1, "showFeedbackIcon": true, "checkVariableNames": false, "expectedVariableNames": [], "answer": "10^x", "scripts": {}, "customMarkingAlgorithm": "", "prompt": "

$f(x)=\\log_{10} x$

", "showPreview": false}], "metadata": {"description": "

finding the inverse of functions

", "licence": "None specified"}, "preamble": {"js": "", "css": ""}, "statement": "

Give the inverse ($f^{-1}(x)$) of:

", "advice": "", "variables": {"f": {"description": "", "name": "f", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)"}, "a": {"description": "", "name": "a", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)"}, "b": {"description": "", "name": "b", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)"}, "d": {"description": "", "name": "d", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)"}, "c": {"description": "", "name": "c", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)"}, "g": {"description": "", "name": "g", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)"}}, "type": "question"}, {"name": "6. Functions from graphs 1", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}], "functions": {"eqnline": {"definition": "// This function creates the board and sets it up, then returns an\n// HTML div tag containing the board.\n \n// The line is described by the equation \n// y = a*x + b\n\n// This function takes as its parameters the coefficients a and b,\n// and the coordinates (x2,y2) of a point on the line.\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: [-13,16,13,-16],\n axis: false,\n showNavigation: false,\n grid: true\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,2],{\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,2],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n// create the static line based on the coefficients a and b\nvar line1 = board.create('line',[[0,b],[1,a+b]],{fixed:true, strokeWidth: 1});\n\n// mark the two given points - one on the y-axis, and one at (x2,y2)\nvar p1 = board.create('point',[0,b],{fixed:true, size:3, name: 'P_1', face: 'cross'});\nvar p2 = board.create('point',[x2,y2],{fixed:true, size:3, name: 'P_2', face: 'cross'});\n\n// Now we can do the clever stuff with the student's answer!\n// We'll add a curve to the board which is a plot of a function we provide.\n// That function will parse the student's input and evaluate it.\n\n// The variable `studentExpression` will store the parsed version of\n// the student's expression.\nvar studentExpression;\n\n// This function evaluates the student's expression at a given point `t`.\nfunction makestudentline(x){\n // Create a JME scope with the variable x set to the given value.\n var nscope = new Numbas.jme.Scope([\nNumbas.jme.builtinScope,\n{variables: {x: new Numbas.jme.types.TNum(x)}}\n ]);\n \n // If the student's input has been parsed, evaluate it\n if(studentExpression) {\ntry {\n var val = Numbas.jme.evaluate(studentExpression,nscope).value;\n return val;\n}\ncatch(e) {\n // If there was an error evaluating the student's expression\n // (wrong variables, or some other weirdness)\n // throw an error\n throw(e)\n}\n }\n // Otherwise, if the student's expression hasn't been parsed\n // (they haven't written anything, or they wrote bad syntax)\n // return 0\n else {\nreturn 0;\n }\n}\nvar studentline = board.create('functiongraph', \n [makestudentline,-13,13],\n {strokeColor:'black', strokeWidth: 3, visible: false}\n );\n\n// This is where some voodoo happens.\n// Because the HTML for the question is inserted into the page after the function eqnline\n// is called, we need to wait until the 'question-html-attached' event is fired\n// to do the interaction with the student input box.\n// So:\n\n// When the question is inserted into the page\nquestion.signals.on('HTMLAttached',function(e) {\n \n // Create a Knockout.js observable\n ko.computed(function(){\n// Get the student's input string from part 0, gap 0.\nvar studentString = question.parts[0].gaps[0].display.studentAnswer();\n\n// Try to parse it as a JME expression\ntry {\n studentExpression = Numbas.jme.compile(studentString,scope);\n \n // If the student didn't write anything, compile returns null\n if(studentExpression === null)\nthrow(new Error('no expression'));\n \n // If everything worked, show the line and update it\n // (this calls makestudentline on a few points)\n studentline.showElement();\n studentline.updateCurve();\n}\ncatch(e) {\n // If something went wrong, hide the curve\n studentExpression = null;\n studentline.hideElement();\n}\n\nboard.update();\n });\n}); \n\nreturn div;", "type": "html", "language": "javascript", "parameters": [["a", "number"], ["b", "number"], ["x2", "number"], ["y2", "number"]]}}, "ungrouped_variables": ["a", "x2", "b", "y2"], "tags": ["graphs", "jsxgraph", "Jsxgraph"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "

Write the equation of graph. The line described by your equation will also be drawn on the diagram.

\n

$y=\\;$[[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{a}x+{b}", "marks": "2", "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

{eqnline(a,b,x2,y2)}

\n

You are given two points $(0,\\var{b})$ and $(\\var{x2},\\var{y2})$, as indicated on the diagram. 

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(-4..4 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "x2": {"definition": "random(-3..3 except -1..1)", "templateType": "anything", "group": "Ungrouped variables", "name": "x2", "description": ""}, "b": {"definition": "random(-6..6 except [0,a])", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "y2": {"definition": "x2*a+b", "templateType": "anything", "group": "Ungrouped variables", "name": "y2", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "6. Functions from graphs 1", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}], "functions": {"eqnline": {"definition": "// This function creates the board and sets it up, then returns an\n// HTML div tag containing the board.\n \n// The line is described by the equation \n// y = a*x + b\n\n// This function takes as its parameters the coefficients a and b,\n// and the coordinates (x2,y2) of a point on the line.\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: [-13,16,13,-16],\n axis: false,\n showNavigation: false,\n grid: true\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,2],{\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,2],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n// create the static line based on the coefficients a and b\nvar line1 = board.create('line',[[0,b],[1,a+b]],{fixed:true, strokeWidth: 1});\n\n// mark the two given points - one on the y-axis, and one at (x2,y2)\nvar p1 = board.create('point',[0,b],{fixed:true, size:3, name: 'P_1', face: 'cross'});\nvar p2 = board.create('point',[x2,y2],{fixed:true, size:3, name: 'P_2', face: 'cross'});\n\n// Now we can do the clever stuff with the student's answer!\n// We'll add a curve to the board which is a plot of a function we provide.\n// That function will parse the student's input and evaluate it.\n\n// The variable `studentExpression` will store the parsed version of\n// the student's expression.\nvar studentExpression;\n\n// This function evaluates the student's expression at a given point `t`.\nfunction makestudentline(x){\n // Create a JME scope with the variable x set to the given value.\n var nscope = new Numbas.jme.Scope([\nNumbas.jme.builtinScope,\n{variables: {x: new Numbas.jme.types.TNum(x)}}\n ]);\n \n // If the student's input has been parsed, evaluate it\n if(studentExpression) {\ntry {\n var val = Numbas.jme.evaluate(studentExpression,nscope).value;\n return val;\n}\ncatch(e) {\n // If there was an error evaluating the student's expression\n // (wrong variables, or some other weirdness)\n // throw an error\n throw(e)\n}\n }\n // Otherwise, if the student's expression hasn't been parsed\n // (they haven't written anything, or they wrote bad syntax)\n // return 0\n else {\nreturn 0;\n }\n}\nvar studentline = board.create('functiongraph', \n [makestudentline,-13,13],\n {strokeColor:'black', strokeWidth: 3, visible: false}\n );\n\n// This is where some voodoo happens.\n// Because the HTML for the question is inserted into the page after the function eqnline\n// is called, we need to wait until the 'question-html-attached' event is fired\n// to do the interaction with the student input box.\n// So:\n\n// When the question is inserted into the page\nquestion.signals.on('HTMLAttached',function(e) {\n \n // Create a Knockout.js observable\n ko.computed(function(){\n// Get the student's input string from part 0, gap 0.\nvar studentString = question.parts[0].gaps[0].display.studentAnswer();\n\n// Try to parse it as a JME expression\ntry {\n studentExpression = Numbas.jme.compile(studentString,scope);\n \n // If the student didn't write anything, compile returns null\n if(studentExpression === null)\nthrow(new Error('no expression'));\n \n // If everything worked, show the line and update it\n // (this calls makestudentline on a few points)\n studentline.showElement();\n studentline.updateCurve();\n}\ncatch(e) {\n // If something went wrong, hide the curve\n studentExpression = null;\n studentline.hideElement();\n}\n\nboard.update();\n });\n}); \n\nreturn div;", "type": "html", "language": "javascript", "parameters": [["a", "number"], ["b", "number"], ["x2", "number"], ["y2", "number"]]}}, "ungrouped_variables": ["a", "x2", "b", "y2"], "tags": ["graphs", "jsxgraph", "Jsxgraph"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "

Write the equation of graph. The line described by your equation will also be drawn on the diagram.

\n

$y=\\;$[[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{a}x+{b}", "marks": "2", "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

{eqnline(a,b,x2,y2)}

\n

You are given two points $(0,\\var{b})$ and $(\\var{x2},\\var{y2})$, as indicated on the diagram. 

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(-4..4 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "x2": {"definition": "random(-3..3 except -1..1)", "templateType": "anything", "group": "Ungrouped variables", "name": "x2", "description": ""}, "b": {"definition": "random(-6..6 except [0,a])", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "y2": {"definition": "x2*a+b", "templateType": "anything", "group": "Ungrouped variables", "name": "y2", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "6. Functions from graphs 1", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}], "functions": {"eqnline": {"definition": "// This function creates the board and sets it up, then returns an\n// HTML div tag containing the board.\n \n// The line is described by the equation \n// y = a*x + b\n\n// This function takes as its parameters the coefficients a and b,\n// and the coordinates (x2,y2) of a point on the line.\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: [-13,16,13,-16],\n axis: false,\n showNavigation: false,\n grid: true\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,2],{\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,2],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n// create the static line based on the coefficients a and b\nvar line1 = board.create('line',[[0,b],[1,a+b]],{fixed:true, strokeWidth: 1});\n\n// mark the two given points - one on the y-axis, and one at (x2,y2)\nvar p1 = board.create('point',[0,b],{fixed:true, size:3, name: 'P_1', face: 'cross'});\nvar p2 = board.create('point',[x2,y2],{fixed:true, size:3, name: 'P_2', face: 'cross'});\n\n// Now we can do the clever stuff with the student's answer!\n// We'll add a curve to the board which is a plot of a function we provide.\n// That function will parse the student's input and evaluate it.\n\n// The variable `studentExpression` will store the parsed version of\n// the student's expression.\nvar studentExpression;\n\n// This function evaluates the student's expression at a given point `t`.\nfunction makestudentline(x){\n // Create a JME scope with the variable x set to the given value.\n var nscope = new Numbas.jme.Scope([\nNumbas.jme.builtinScope,\n{variables: {x: new Numbas.jme.types.TNum(x)}}\n ]);\n \n // If the student's input has been parsed, evaluate it\n if(studentExpression) {\ntry {\n var val = Numbas.jme.evaluate(studentExpression,nscope).value;\n return val;\n}\ncatch(e) {\n // If there was an error evaluating the student's expression\n // (wrong variables, or some other weirdness)\n // throw an error\n throw(e)\n}\n }\n // Otherwise, if the student's expression hasn't been parsed\n // (they haven't written anything, or they wrote bad syntax)\n // return 0\n else {\nreturn 0;\n }\n}\nvar studentline = board.create('functiongraph', \n [makestudentline,-13,13],\n {strokeColor:'black', strokeWidth: 3, visible: false}\n );\n\n// This is where some voodoo happens.\n// Because the HTML for the question is inserted into the page after the function eqnline\n// is called, we need to wait until the 'question-html-attached' event is fired\n// to do the interaction with the student input box.\n// So:\n\n// When the question is inserted into the page\nquestion.signals.on('HTMLAttached',function(e) {\n \n // Create a Knockout.js observable\n ko.computed(function(){\n// Get the student's input string from part 0, gap 0.\nvar studentString = question.parts[0].gaps[0].display.studentAnswer();\n\n// Try to parse it as a JME expression\ntry {\n studentExpression = Numbas.jme.compile(studentString,scope);\n \n // If the student didn't write anything, compile returns null\n if(studentExpression === null)\nthrow(new Error('no expression'));\n \n // If everything worked, show the line and update it\n // (this calls makestudentline on a few points)\n studentline.showElement();\n studentline.updateCurve();\n}\ncatch(e) {\n // If something went wrong, hide the curve\n studentExpression = null;\n studentline.hideElement();\n}\n\nboard.update();\n });\n}); \n\nreturn div;", "type": "html", "language": "javascript", "parameters": [["a", "number"], ["b", "number"], ["x2", "number"], ["y2", "number"]]}}, "ungrouped_variables": ["a", "x2", "b", "y2"], "tags": ["graphs", "jsxgraph", "Jsxgraph"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "

Write the equation of graph. The line described by your equation will also be drawn on the diagram.

\n

$y=\\;$[[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{a}x+{b}", "marks": "2", "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

{eqnline(a,b,x2,y2)}

\n

You are given two points $(0,\\var{b})$ and $(\\var{x2},\\var{y2})$, as indicated on the diagram. 

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(-4..4 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "x2": {"definition": "random(-3..3 except -1..1)", "templateType": "anything", "group": "Ungrouped variables", "name": "x2", "description": ""}, "b": {"definition": "random(-6..6 except [0,a])", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "y2": {"definition": "x2*a+b", "templateType": "anything", "group": "Ungrouped variables", "name": "y2", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "7. Functions from points", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}], "functions": {}, "ungrouped_variables": ["xone", "m", "c", "yone", "xtwo", "ytwo"], "tags": ["graphs", "jsxgraph", "Jsxgraph"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "

What is $m$?

", "allowFractions": false, "variableReplacements": [], "maxValue": "({ytwo}-{yone})/({xtwo}-{xone})", "minValue": "({ytwo}-{yone})/({xtwo}-{xone})", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "2", "type": "numberentry", "showPrecisionHint": false}, {"prompt": "

What is $c$?

", "allowFractions": false, "variableReplacements": [], "maxValue": "{yone}-{xone}*{m}", "minValue": "{yone}-{xone}*{m}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "2", "type": "numberentry", "showPrecisionHint": false}], "statement": "

These two points $(\\var{xone},\\var{yone})$ and $(\\var{xtwo},\\var{ytwo})$ both lie on a function in the form $y=mx+c$.

\n

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"c": {"definition": "random(-4..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "yone": {"definition": "{xone}*{m}+{c}", "templateType": "anything", "group": "Ungrouped variables", "name": "yone", "description": ""}, "m": {"definition": "random(-3,3,0.5)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "xtwo": {"definition": "random(-6..6 except xone)", "templateType": "anything", "group": "Ungrouped variables", "name": "xtwo", "description": ""}, "xone": {"definition": "random(-6..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "xone", "description": ""}, "ytwo": {"definition": "{xtwo}*{m}+{c}", "templateType": "anything", "group": "Ungrouped variables", "name": "ytwo", "description": ""}}, "metadata": {"notes": "", "description": "

Student finds equation without plot to guide

", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "7. Functions from points", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}], "functions": {}, "ungrouped_variables": ["xone", "m", "c", "yone", "xtwo", "ytwo"], "tags": ["graphs", "jsxgraph", "Jsxgraph"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "

What is $m$?

", "allowFractions": false, "variableReplacements": [], "maxValue": "({ytwo}-{yone})/({xtwo}-{xone})", "minValue": "({ytwo}-{yone})/({xtwo}-{xone})", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "2", "type": "numberentry", "showPrecisionHint": false}, {"prompt": "

What is $c$?

", "allowFractions": false, "variableReplacements": [], "maxValue": "{yone}-{xone}*{m}", "minValue": "{yone}-{xone}*{m}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "2", "type": "numberentry", "showPrecisionHint": false}], "statement": "

These two points $(\\var{xone},\\var{yone})$ and $(\\var{xtwo},\\var{ytwo})$ both lie on a function in the form $y=mx+c$.

\n

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"c": {"definition": "random(-4..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "yone": {"definition": "{xone}*{m}+{c}", "templateType": "anything", "group": "Ungrouped variables", "name": "yone", "description": ""}, "m": {"definition": "random(-3,3,0.5)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "xtwo": {"definition": "random(-6..6 except xone)", "templateType": "anything", "group": "Ungrouped variables", "name": "xtwo", "description": ""}, "xone": {"definition": "random(-6..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "xone", "description": ""}, "ytwo": {"definition": "{xtwo}*{m}+{c}", "templateType": "anything", "group": "Ungrouped variables", "name": "ytwo", "description": ""}}, "metadata": {"notes": "", "description": "

Student finds equation without plot to guide

", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "7. Functions from points", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}], "functions": {}, "ungrouped_variables": ["xone", "m", "c", "yone", "xtwo", "ytwo"], "tags": ["graphs", "jsxgraph", "Jsxgraph"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "

What is $m$?

", "allowFractions": false, "variableReplacements": [], "maxValue": "({ytwo}-{yone})/({xtwo}-{xone})", "minValue": "({ytwo}-{yone})/({xtwo}-{xone})", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "2", "type": "numberentry", "showPrecisionHint": false}, {"prompt": "

What is $c$?

", "allowFractions": false, "variableReplacements": [], "maxValue": "{yone}-{xone}*{m}", "minValue": "{yone}-{xone}*{m}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "2", "type": "numberentry", "showPrecisionHint": false}], "statement": "

These two points $(\\var{xone},\\var{yone})$ and $(\\var{xtwo},\\var{ytwo})$ both lie on a function in the form $y=mx+c$.

\n

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"c": {"definition": "random(-4..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "yone": {"definition": "{xone}*{m}+{c}", "templateType": "anything", "group": "Ungrouped variables", "name": "yone", "description": ""}, "m": {"definition": "random(-3,3,0.5)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "xtwo": {"definition": "random(-6..6 except xone)", "templateType": "anything", "group": "Ungrouped variables", "name": "xtwo", "description": ""}, "xone": {"definition": "random(-6..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "xone", "description": ""}, "ytwo": {"definition": "{xtwo}*{m}+{c}", "templateType": "anything", "group": "Ungrouped variables", "name": "ytwo", "description": ""}}, "metadata": {"notes": "", "description": "

Student finds equation without plot to guide

", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}]}], "navigation": {"onleave": {"action": "none", "message": ""}, "showresultspage": "oncompletion", "showfrontpage": true, "allowregen": true, "reverse": true, "preventleave": true, "browse": true}, "type": "exam", "contributors": [{"name": "emma rand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/115/"}], "extensions": ["jsxgraph"], "custom_part_types": [], "resources": []}