// Numbas version: finer_feedback_settings {"name": "Linear graphs: Plotting 1 - integer values", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Linear graphs: Plotting 1 - integer values", "tags": ["Category: Linear Graphs"], "metadata": {"description": "
Drag points on an axis to plot a linear graph (integer gradient and intercept only)
", "licence": "None specified"}, "statement": "Move the points $A$ and $B$ to make line $\\simplify{y={m}x+{c}}$
", "advice": "There are two ways to think about this, either by considering the points A and B, or by considering gradient ($m$) and intercept ($c$).
Let us firstly look at gradient and intercept.
$y=\\simplify{{m}x+{c}}$
Therefore $m = \\var{m}$ and $c = \\var{c}$.
The intercept tells us where the line intercepts the $y$-axis, so we can move one of the points to $(0,\\var{c})$ straight away.
The gradient is a measure of 'how many units up for each unit across' (or 'units down' if the gradient is negative). In this case we want to go {uod} {abs(m)} for each unit across, so to place the second point we move across $1$ unit on the $x$-axis and {uod} {abs(m)} on the $y$-axis, which takes us to
$(1, \\var{c+m} )$.
The alternative method is to place the points directly
Choose any value of $x$ for your first point.
We will take $x = 1$ for this example.
Calculate the corresponding $y$-value by substituting into the equation $y=\\simplify{{m}x+{c}}$:
$y = \\var{m} \\times 1 + \\var{c}$
$y = \\var{m+c}$
\ntherefore the first point is $(1,\\var{m+c})$.
We repeat the process for $x=2$ (or any other value of $x$ that you choose)
$y = \\var{m} \\times 2 + \\var{c}$
\n$y = \\var{2*m+c}$
\ntherefore the second point is $(2,\\var{2*m+c})$.
", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"app": {"name": "app", "group": "Ungrouped variables", "definition": "geogebra_applet(\n 800,500,\n [\n A: [\n definition: p1,\n label_visible: false\n ],\n B: [\n definition: p2,\n label_visible: false\n ],\n line: [\n definition: \"Line(A,B)\",\n label_visible: false\n ]\n \n \n ]\n \n \n)\n\n", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(-4,-3,-2,2,3,4,5)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "P1": {"name": "P1", "group": "Ungrouped variables", "definition": "vector(0,0)", "description": "", "templateType": "anything", "can_override": false}, "P2": {"name": "P2", "group": "Ungrouped variables", "definition": "vector(1,1)", "description": "", "templateType": "anything", "can_override": false}, "uod": {"name": "uod", "group": "Ungrouped variables", "definition": "if(m=abs(m),'up','down')", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["app", "m", "c", "P1", "P2", "uod"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "extension", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "l:\n value(app,\"line\")\n\nax:\n x(app,\"A\")\n\nay:\n y(app,\"A\")\n\nbx:\n x(app,\"B\")\n\nby:\n y(app,\"B\")\n\nmans:\n (ay-by)/(ax-bx)\n\ncans:\n ay - mans*ax\n\nmark:\n feedback(\"Your line is $\\\\var{value(app,'line')}$.\");\n correctif(mans=m AND cans=c)\n\ninterpreted_answer:\n mans\n", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "You can zoom and pan this image.
{app}