// Numbas version: finer_feedback_settings {"name": "Luis'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": "\n
The equation of the line is of the form $y=mx+c$.
\nCalculate the gradient $m=\\dfrac{\\var{d}-(\\var{b})}{\\var{c}-(\\var{a})}=\\dfrac{\\var{d-b}}{\\var{c-a}}$ between the given points and then calculate the constant term $c$ by noting that $y=\\var{b}$ when $x=\\var{a}$.
\nUsing 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} \\]
Hence the equation of the line is
\\[y = \\simplify[std]{({b-d}/{a-c})x+{b*c-a*d}/{c-a}}\\]
Encuentre la ecuación de la línea recta que pasa por los puntos $ (\\ var {a}, \\ var {b}) $ y $ (\\ var {c}, \\ var {d}) $:
\n\n
Ingrese su respuesta en la forma $ mx + c $ para los valores adecuados de $ m $ y $ c $.
\nIngrese $ m $ y $ c $ como fracciones o enteros según corresponda y no como decimales.
\nSi ingresa $ m $ como fracción, ponga corchetes () alrededor de la fracción. Por ejemplo, si su respuesta para $ m $ es $ \\ dfrac {-2} {3} $ y su respuesta para $ c $ es $ \\ dfrac {7} {5} $, debe escribir $ (- 2/3) ) x + 7/5 $.
\nHaga clic en Mostrar pasos si necesita ayuda, perderá 1 marca si lo hace.
", "parts": [{"variableReplacements": [], "showFeedbackIcon": true, "steps": [{"variableReplacements": [], "showFeedbackIcon": true, "prompt": "\nThe equation of the line is of the form $y=mx+c$.
\nCalculate the gradient $m$ between the given points and then calculate the constant term $c$ by noting that $y=\\var{b}$ when $x=\\var{a}$.
\n ", "scripts": {}, "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "type": "information", "showCorrectAnswer": true, "marks": 0, "customMarkingAlgorithm": ""}], "scripts": {}, "sortAnswers": false, "type": "gapfill", "customMarkingAlgorithm": "", "marks": 0, "prompt": "$y=\\;\\phantom{{}}$[[0]]
", "variableReplacementStrategy": "originalfirst", "unitTests": [], "extendBaseMarkingAlgorithm": true, "stepsPenalty": 1, "gaps": [{"variableReplacements": [], "answerSimplification": "std", "showFeedbackIcon": true, "checkingAccuracy": 0.001, "scripts": {}, "notallowed": {"showStrings": false, "partialCredit": 0, "message": "Input all numbers as fractions or integers as appropriate and not as decimals.
", "strings": ["."]}, "expectedVariableNames": [], "type": "jme", "customMarkingAlgorithm": "", "marks": 2, "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "unitTests": [], "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "answer": "({b-d}/{a-c})x+{b*c-a*d}/{c-a}", "showCorrectAnswer": true, "failureRate": 1}], "showCorrectAnswer": true}], "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s1", "b1"], "metadata": {"description": "Find the equation of the straight line which passes through the points $(a,b)$ and $(c,d)$.
", "licence": "Creative Commons Attribution 4.0 International"}, "tags": [], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variables": {"c": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "definition": "a+Random(1..4)*s1"}, "g": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "definition": "(b*c-a*d)/(c-a)"}, "f": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "definition": "(b-d)/(a-c)"}, "b": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "definition": "if(b1=d,b1+random(1..3),b1)"}, "b1": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "definition": "random(-9..9)"}, "s1": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "definition": "random(-1,1)"}, "d": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "definition": "random(-9..9)"}, "a": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "definition": "random(1,-1)*random(1..4)"}}, "type": "question", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}