// Numbas version: exam_results_page_options {"name": "Maria's copy of Equation of a straight line", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "

The equation of the line is of the form $y=mx+c$.

\n

You are given the gradient $\\displaystyle m= \\simplify{{b-d}/{a-c}}$ and we can calculate the constant term $c$ by noting that $y=\\var{b}$ when $x=\\var{a}$.

\n

Using this we get:
\\[ \\begin{eqnarray} \\var{b}&=&\\simplify[std]{({b-d}/{a-c}){a}+c} \\Rightarrow\\\\ c&=&\\simplify[std]{{b}-({b-d}/{a-c}){a}={(b*c-a*d)}/{(c-a)}} \\end{eqnarray} \\]

\n

Hence the equation of the line is
\\[y = \\simplify[std]{({b-d}/{a-c})x+{b*c-a*d}/{c-a}}\\]

", "variable_groups": [], "name": "Maria's copy of Equation of a straight line", "statement": "

Find the equation of the straight line which:

\n \n

 

\n \n

 

\n

Input your answer in the form $mx+c$ for suitable values of $m$ and $c$.

\n

Input $m$ and $c$ as fractions or integers as appropriate and not as decimals.

\n

Click on Show steps if you need help, you will lose 1 mark if you do so.

", "preamble": {"css": "", "js": ""}, "functions": {}, "question_groups": [{"pickQuestions": 0, "name": "", "pickingStrategy": "all-ordered", "questions": []}], "variables": {"g": {"definition": "(b*c-a*d)/(c-a)", "templateType": "anything", "name": "g", "group": "Ungrouped variables", "description": ""}, "f": {"definition": "(b-d)/(a-c)", "templateType": "anything", "name": "f", "group": "Ungrouped variables", "description": ""}, "a": {"definition": "random(1,-1)*random(1..4)", "templateType": "anything", "name": "a", "group": "Ungrouped variables", "description": ""}, "b": {"definition": "if(b1=d,b1+random(1..3),b1)", "templateType": "anything", "name": "b", "group": "Ungrouped variables", "description": ""}, "c": {"definition": "a+Random(1..4)*s1", "templateType": "anything", "name": "c", "group": "Ungrouped variables", "description": ""}, "s1": {"definition": "random(-1,1)", "templateType": "anything", "name": "s1", "group": "Ungrouped variables", "description": ""}, "d": {"definition": "random(-9..9)", "templateType": "anything", "name": "d", "group": "Ungrouped variables", "description": ""}, "b1": {"definition": "random(-9..9)", "templateType": "anything", "name": "b1", "group": "Ungrouped variables", "description": ""}}, "metadata": {"notes": "

5/08/2012:

\n

Added tags.

\n

Added description.

\n

Checked calculation.OK.

\n

Improved display in content areas. Corrected some minor typos.

", "description": "

Find the equation of a straight line which has a given gradient $m$ and passes through the given point $(a,b)$.

", "licence": "Creative Commons Attribution 4.0 International"}, "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"marks": 0, "stepsPenalty": 1, "type": "gapfill", "showCorrectAnswer": true, "steps": [{"marks": 0, "prompt": "

The equation of the line is of the form $y=mx+c$.

\n

You are given the gradient $m$ and you can calculate the constant term $c$ by noting that $y=\\var{b}$ when $x=\\var{a}$.

", "scripts": {}, "showCorrectAnswer": true, "type": "information"}], "scripts": {}, "prompt": "

$y=\\;\\phantom{{}}$[[0]]

", "gaps": [{"marks": 2, "notallowed": {"partialCredit": 0, "showStrings": false, "message": "

Input all numbers as fractions or integers as appropriate and not as decimals.

", "strings": ["."]}, "expectedvariablenames": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "checkvariablenames": false, "answersimplification": "std", "answer": "({b-d}/{a-c})x+{b*c-a*d}/{c-a}", "showpreview": true, "scripts": {}, "vsetrangepoints": 5, "type": "jme", "checkingaccuracy": 0.001, "vsetrange": [0, 1]}]}], "type": "question", "showQuestionGroupNames": false, "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "tags": ["checked2015", "diagram", "equation of a straight line", "gradient of a line", "mas1601", "MAS1601", "Steps", "steps"], "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s1", "b1"], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}