// Numbas version: finer_feedback_settings {"name": "2.5.2.1 Gradient of a line through 2 points", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "2.5.2.1 Gradient of a line through 2 points", "tags": [], "metadata": {"description": "

Find the gradient of a line through 2 points. The line is not vertical.

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

Calculate the gradient of the line joining $(\\var{x1},\\var{y1})$ and $(\\var{x2},\\var{y2})$

", "advice": "

\\[ \\begin{align*} \\textrm{gradient} &= \\frac{y_2-y_1}{x_2-x_1}\\\\&=\\frac{\\var{y2}-(\\var{y1}) }{\\var{x2}-(\\var{x1})} \\\\ &=\\var{expression(string(rational((y2-y1)/(x2-x1))))}\\end{align*}\\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"x1,x2": {"name": "x1,x2", "group": "Ungrouped variables", "definition": "shuffle(-20..20)[0..2]", "description": "", "templateType": "anything", "can_override": false}, "y1,y2": {"name": "y1,y2", "group": "Ungrouped variables", "definition": "repeat(random(-20..20),2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["x1,x2", "y1,y2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "(y2-y1)/(x2-x1)", "maxValue": "(y2-y1)/(x2-x1)", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": true, "mustBeReducedPC": "50", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "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/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}