// Numbas version: exam_results_page_options {"name": "Simon's copy of Terry's copy of Straight lines: one point gradient", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Given one point and the gradient determine the equation of the line.

"}, "variables": {"scale": {"group": "Ungrouped variables", "definition": "random(-1,1,2,-2)", "templateType": "anything", "name": "scale", "description": ""}, "rise": {"group": "Ungrouped variables", "definition": "if(run=2,random(1,3,5,7),if(run=3,random(1,2,4,5,7),if(run=5,random(1,2,3,4,6,7),if(run=7,random(1,2,3,4,5,6)))))", "templateType": "anything", "name": "rise", "description": ""}, "brun": {"group": "Ungrouped variables", "definition": "random(2,3,5,7)", "templateType": "anything", "name": "brun", "description": ""}, "b": {"group": "Ungrouped variables", "definition": "random(-12..5 except 0)", "templateType": "anything", "name": "b", "description": ""}, "bpoint_y": {"group": "Ungrouped variables", "definition": "bb+brise*bscale", "templateType": "anything", "name": "bpoint_y", "description": ""}, "bpoint_x": {"group": "Ungrouped variables", "definition": "brun*bscale", "templateType": "anything", "name": "bpoint_x", "description": ""}, "brise": {"group": "Ungrouped variables", "definition": "-if(brun=2,random(1,3,5,7),if(brun=3,random(1,2,4,5,7),if(brun=5,random(1,2,3,4,6,7),if(brun=7,random(1,2,3,4,5,6)))))", "templateType": "anything", "name": "brise", "description": ""}, "point_y": {"group": "Ungrouped variables", "definition": "b+rise*scale", "templateType": "anything", "name": "point_y", "description": ""}, "point_x": {"group": "Ungrouped variables", "definition": "run*scale", "templateType": "anything", "name": "point_x", "description": ""}, "bscale": {"group": "Ungrouped variables", "definition": "random(-2..2 except [0,scale])", "templateType": "anything", "name": "bscale", "description": ""}, "bb": {"group": "Ungrouped variables", "definition": "random(-5..12 except 0)", "templateType": "anything", "name": "bb", "description": ""}, "run": {"group": "Ungrouped variables", "definition": "random(2,3,5,7)", "templateType": "anything", "name": "run", "description": ""}}, "tags": [], "extensions": ["jsxgraph"], "functions": {}, "preamble": {"css": "", "js": ""}, "advice": "

Substitute the $x$ and $y$ values of the point and the value for $m$ into the equation of a line $y=mx+c$, then solve to determine $c$. Now you have $m$ and $c$ so you can write the equation of the line in the form $y=mx+c$.

\n

\n

(a)

\n

To find the equation of the line through $(\\var{point_x},\\var{point_y})$ with a gradient of $\\frac{\\var{rise}}{\\var{run}}$:

\n

Take the point $(\\var{point_x},\\var{point_y})$ as $(x,y)$ and substitute this and the gradient into the equation $y=mx+c$.

\n

This gives $\\var{point_y}=\\frac{\\var{rise}}{\\var{run}}(\\var{point_x})+c$.

\n

Rearranging gives $c=\\var{point_y}-\\frac{\\var{rise}}{\\var{run}}(\\var{point_x})=\\var{point_y-(point_x*rise)/run}$

\n

Therefore the equation of the line is $y=\\simplify{{rise}/{run}x+{b}}$.

\n

\n

(b)

\n

To find the equation of the line through $(\\var{bpoint_x},\\var{bpoint_y})$ with a gradient of $\\frac{\\var{brise}}{\\var{brun}}$:

\n

Take the point $(\\var{bpoint_x},\\var{bpoint_y})$ as $(x,y)$ and substitute this and the gradient into the equation $y=mx+c$.

\n

This gives $\\var{bpoint_y}=\\frac{\\var{brise}}{\\var{brun}}(\\var{bpoint_x})+c$.

\n

Rearranging gives $c=\\var{bpoint_y}-\\frac{\\var{brise}}{\\var{brun}}(\\var{bpoint_x})=\\var{bpoint_y-(bpoint_x*brise)/brun}$

\n

Therefore the equation of the line is $y=\\simplify{{brise}/{brun}x+{bb}}$.

", "statement": "

In each part, find the equation of the straight-line graph in the form $y=mx+c$

", "parts": [{"showCorrectAnswer": true, "steps": [{"showCorrectAnswer": true, "marks": 0, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "unitTests": [], "prompt": "

Substitute the $x$ and $y$ values of the point and the value for $m$ into the equation of a line $y=mx+c$, then solve to determine $c$. Now you have $m$ and $c$ so you can write the equation of the line in the form $y=mx+c$.

\n

\n

For example, suppose we had to find the equation of the line through $(2,3)$ with a gradient of $\\frac{1}{4}$:

\n

Take the point $(2,3)$ as $(x,y)$ and substitute this and the gradient into the equation $y=mx+c$. This gives $3=\\frac{1}{4}(2)+c$. Solving for $c$ gives $c=\\frac{5}{2}$. Therefore the equation of the line is $y=\\frac{1}{4}x+\\frac{5}{2}$.

\n

\n

\n

", "customName": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showFeedbackIcon": true, "useCustomName": false, "type": "information", "scripts": {}}], "marks": 0, "stepsPenalty": "1", "customMarkingAlgorithm": "", "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "unitTests": [], "gaps": [{"valuegenerators": [{"value": "", "name": "x"}], "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "unitTests": [], "checkVariableNames": true, "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "showPreview": true, "type": "jme", "scripts": {}, "showCorrectAnswer": true, "vsetRange": [0, 1], "marks": "2", "customMarkingAlgorithm": "", "answer": "{rise}/{run}*x+{b}", "failureRate": 1, "answerSimplification": "all", "customName": "", "variableReplacements": [], "showFeedbackIcon": true, "useCustomName": false, "vsetRangePoints": 5, "notallowed": {"strings": ["="], "showStrings": false, "message": "", "partialCredit": 0}}], "prompt": "

The line that passes through the point ({point_x},{point_y}) with a gradient of $\\simplify{{rise}/{run}}$

\n

$y=$ [[0]]

", "customName": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showFeedbackIcon": true, "useCustomName": false, "type": "gapfill", "scripts": {}}, {"showCorrectAnswer": true, "marks": 0, "customMarkingAlgorithm": "", "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "unitTests": [], "gaps": [{"valuegenerators": [{"value": "", "name": "x"}], "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "unitTests": [], "checkVariableNames": true, "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "showPreview": true, "type": "jme", "scripts": {}, "showCorrectAnswer": true, "vsetRange": [0, 1], "marks": "2", "customMarkingAlgorithm": "", "answer": "{brise}/{brun}*x+{bb}", "failureRate": 1, "answerSimplification": "all", "customName": "", "variableReplacements": [], "showFeedbackIcon": true, "useCustomName": false, "vsetRangePoints": 5, "notallowed": {"strings": ["="], "showStrings": false, "message": "", "partialCredit": 0}}], "prompt": "

The line that passes through the point ({bpoint_x},{bpoint_y}) with a gradient of $\\simplify{{brise}/{brun}}$

\n

$y=$ [[0]]

", "customName": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showFeedbackIcon": true, "useCustomName": false, "type": "gapfill", "scripts": {}}], "name": "Simon's copy of Terry's copy of Straight lines: one point gradient", "ungrouped_variables": ["b", "run", "rise", "point_y", "point_x", "scale", "bb", "brun", "brise", "bscale", "bpoint_y", "bpoint_x"], "rulesets": {}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}