// Numbas version: finer_feedback_settings {"name": "2.5.3 Task 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "2.5.3 Task 1", "tags": [], "metadata": {"description": "

Find the equation of a line passing through two points in the form y=mx+b. The question is set up so that m and b will be integers.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Find the equation of the line passing through $A(\\var{x1}, \\var{y1})$ and $B(\\var{x2}, \\var{y2})$.

", "advice": "

$\\begin{align}\\dfrac{y-\\var{y1}}{\\var{y2}-\\var{y1}}&=\\dfrac{x-\\var{x1}}{\\var{x2}-\\var{x1}}\\\\ \\dfrac{\\var{simplify(expression(\"y-\"+y1),\"all\")}}{\\var{y2-y1}}&=\\dfrac{\\var{simplify(expression(\"x-\"+x1),\"all\")}}{\\var{x2-x1}}\\\\ \\var{simplify(expression(\"y-\"+y1),\"all\")} &= \\dfrac{\\var{y2-y1}}{\\var{x2-x1}}(\\var{simplify(expression(\"x-\"+x1),\"all\")})\\\\&= \\var[fractionNumbers]{simplify(expression( string(simplify(expression(\"(\"+y2+\"-\"+y1+\")/(\"+x2+\"-\"+x1+\")*x\" ),\"all\"))+\"+\"+string(-x1*(y2-y1)/(x2-x1))),\"basic\")}\\\\ y&= \\var[fractionNumbers]{simplify(expression( string(simplify(expression(\"(\"+y2+\"-\"+y1+\")/(\"+x2+\"-\"+x1+\")*x\" ),\"all\"))+\"+\"+string(-x1*(y2-y1)/(x2-x1)+y1 )),\"basic\")} \\end{align}$

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vars": {"name": "vars", "group": "Ungrouped variables", "definition": "shuffle(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "x1": {"name": "x1", "group": "Ungrouped variables", "definition": "vars[0]", "description": "", "templateType": "anything", "can_override": false}, "x2": {"name": "x2", "group": "Ungrouped variables", "definition": "vars[2]", "description": "", "templateType": "anything", "can_override": false}, "y1": {"name": "y1", "group": "Ungrouped variables", "definition": "vars[3]", "description": "", "templateType": "anything", "can_override": false}, "y2": {"name": "y2", "group": "Ungrouped variables", "definition": "vars[4]*(x2-x1)+y1", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "({y2}-{y1})/({x2}-{x1})", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "(-{x1})*({y2}-{y1})/({x2}-{x1})+{y1}", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vars", "x1", "x2", "y1", "y2", "m", "b"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

First apply the formula $\\dfrac{y-y_1}{y_2-y_1}=\\dfrac{x-x_1}{x_2-x_1}$

\n

Type in the equation that you get.

", "answer": "(y-{y1})/({y2}-{y1}) = (x-{x1})/({x2}-{x1})", "answerSimplification": "!all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": "(x-{x1})*({y2}-{y1})/({x2}-{x1})+{y1}"}]}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Now simplify this to obtain the required equation. Leave any rational numbers as fractions.

\n

$y =$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "line equation", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "

Notice that you do not need to type in the y= as it is already on the screen for you.

", "useAlternativeFeedback": false, "answer": "y={m}x+{b}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "answer": "{m}x+{b}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "resources": []}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}