// Numbas version: finer_feedback_settings {"name": "Equation de droite", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "variablesTest": {"maxRuns": 100, "condition": "\n"}, "statement": "
Dans cette question, il s'agit de trouver une équation de droite de la forme $y=mx+c$ passant par deux points dont les coordonnées sont données.
\n", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variable_groups": [], "ungrouped_variables": ["x_a", "x_b", "y_a", "y_b", "m", "c"], "advice": "L'équation d'une droite passant par deux points se trouve en calculant le coefficient directeur de la droite et l'ordonnée à l'origine.
\nOn trouve le coefficient directeur ($m$) en utiliant les points $A = (x_1,y_1)=(\\var{x_a},\\var{y_a})$ et $B = (x_2,y_2)=(\\var{x_b},\\var{y_b})$ grâce à la formule suivante :
\n\\begin{align}
m &= \\frac{y_2-y_1}{x_2-x_1} \\\\[0.5em]
&= \\frac{\\simplify[!collectNumbers]{{y_b}-{y_a}}}{\\simplify[!collectNumbers]{{x_b}-{x_a}}} \\\\[0.5em]
&= \\frac{\\simplify[]{{y_b}-{y_a}}}{\\simplify{{x_b}-{x_a}}} \\\\[0.5em]
&= \\simplify[simplifyFractions,unitDenominator]{({y_b-y_a})/({x_b-x_a})}\\text{.}
\\end{align}
L'équation de la droite étant de la forme $y=mx+c$, on trouve l'ordonnée à l'origine $c$ en utiisant les coordonnées d'un des deux points :
\n\\[c = y_1-mx_1 \\quad \\mathrm{ou} \\quad c = y_2-mx_2 \\,\\text{.} \\]
\nPar exemple avec le point $A$ :
\n\\[
\\begin{align}
c &= y_1-mx_1 \\\\
&= \\var{y_a}-\\var[fractionnumbers]{m}\\times\\var{x_a} \\\\
& = \\simplify[fractionnumbers]{{y_a-m*x_a}}\\text{.}
\\end{align}
\\]
c)
\nOn injecte alors les valeurs calculées de $m$ et $c$ dans l'équation $y=mx+c$ et on obtient l'équation de droite:
\n\\[y=\\simplify[!noLeadingMinus,fractionNumbers,unitFactor]{{m} x+ {c}}\\text{.}\\]
\n", "extensions": [], "rulesets": {}, "preamble": {"css": "", "js": ""}, "name": "Equation de droite", "parts": [{"showCorrectAnswer": true, "unitTests": [], "marks": 0, "scripts": {}, "gaps": [{"showCorrectAnswer": true, "marks": "4", "scripts": {}, "answerSimplification": "fractionNumbers, zeroTerm", "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "checkingType": "absdiff", "checkVariableNames": true, "showPreview": true, "showFeedbackIcon": true, "failureRate": 1, "notallowed": {"showStrings": false, "strings": ["c", "m"], "partialCredit": 0, "message": "L'équation doit être de la forme y = mx +c avec m et c des nombres.
"}, "unitTests": [], "answer": "{m}*x+{c}", "valuegenerators": [{"name": "x", "value": ""}], "customName": "", "checkingAccuracy": 0.001, "extendBaseMarkingAlgorithm": true, "vsetRange": [0, 1], "variableReplacements": [], "type": "jme", "useCustomName": false, "customMarkingAlgorithm": ""}], "steps": [{"showCorrectAnswer": true, "marks": 1, "scripts": {}, "mustBeReducedPC": "80", "mustBeReduced": true, "notationStyles": ["plain", "en", "si-en", "si-fr"], "variableReplacementStrategy": "originalfirst", "minValue": "m", "useCustomName": false, "showFeedbackIcon": true, "prompt": "Combien vaut le coefficient directeur de la droite ?
", "unitTests": [], "showFractionHint": true, "correctAnswerFraction": true, "allowFractions": true, "customName": "", "maxValue": "m", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "type": "numberentry", "correctAnswerStyle": "si-fr", "customMarkingAlgorithm": ""}, {"showCorrectAnswer": true, "marks": 1, "scripts": {}, "mustBeReducedPC": "80", "mustBeReduced": true, "notationStyles": ["plain", "en", "si-en", "si-fr"], "variableReplacementStrategy": "originalfirst", "minValue": "c", "useCustomName": false, "showFeedbackIcon": true, "prompt": "Combien vaut l'ordonnée à l'origine de la droite ?
", "unitTests": [], "showFractionHint": true, "correctAnswerFraction": true, "allowFractions": true, "customName": "", "maxValue": "c", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "type": "numberentry", "correctAnswerStyle": "si-fr", "customMarkingAlgorithm": ""}], "stepsPenalty": "1", "customName": "", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": [], "sortAnswers": false, "type": "gapfill", "extendBaseMarkingAlgorithm": true, "prompt": "Donner l'équation de la droite passant par les points $A(\\var{x_a}, \\var{y_a})$ et $B(\\var{x_b}, \\var{y_b})$
\n$\\displaystyle y=$ [[0]]
", "customMarkingAlgorithm": ""}], "functions": {}, "variables": {"y_b": {"name": "y_b", "description": "", "group": "Ungrouped variables", "templateType": "randrange", "definition": "random(-8 .. 8#1)"}, "c": {"name": "c", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "y_a-m*x_a"}, "x_b": {"name": "x_b", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random([-8,8] except x_a)"}, "y_a": {"name": "y_a", "description": "", "group": "Ungrouped variables", "templateType": "randrange", "definition": "random(-8 .. 8#1)"}, "m": {"name": "m", "description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "(y_a-y_b)/(x_a-x_b)"}, "x_a": {"name": "x_a", "description": "", "group": "Ungrouped variables", "templateType": "randrange", "definition": "random(-8 .. 8#1)"}}, "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}, {"name": "Alain Virouleau", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2597/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}, {"name": "Alain Virouleau", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2597/"}]}