// Numbas version: exam_results_page_options {"name": "Straight lines: does a given point lie on the line?", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": [], "name": "Straight lines: does a given point lie on the line?", "tags": ["linear", "linear equation", "Straight Line", "straight line"], "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": "1", "displayColumns": "0", "prompt": "

Does the point $(\\var{xpoint},\\var{ypoint})$ lie on the line $\\simplify{y={grad}x+{yint}}$?

", "matrix": "markinga", "shuffleChoices": false, "variableReplacements": [], "choices": ["

Yes

", "

No

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "steps": [{"prompt": "

Recall the point $(\\var{xpoint},\\var{ypoint})$ is a representation of $x=\\var{xpoint}$ and $y=\\var{ypoint}$. 

\n

Substitute $x=\\var{xpoint}$ and $y=\\var{ypoint}$ into $\\simplify{y={grad}x+{yint}}$ and see if the left hand side equals the right hand side:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\var{ypoint}$$\\stackrel{?}{=}$$\\simplify[basic]{{grad}*{xpoint}+{yint}}$
$\\var{ypoint}$$=$$\\simplify{{grad}*{xpoint}+{yint}}$
\n

And so the point lies on the line.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\var{ypoint}$$\\stackrel{?}{=}$$\\simplify[basic]{{grad}*{xpoint}+{yint}}$
$\\var{ypoint}$$\\ne$$\\simplify{{grad}*{xpoint}+{yint}}$
\n

And so the point does not lie on the line.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "marks": 0, "scripts": {}, "maxMarks": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"stepsPenalty": "1", "displayColumns": 0, "prompt": "

Does the line $\\simplify{{a}x+{b}y+{c}=0}$ pass through the point $(\\var{xbpoint},\\simplify[fractionnumbers]{{ybpoint}})$?

", "matrix": "markingb", "shuffleChoices": false, "variableReplacements": [], "choices": ["

Yes

", "

No

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "steps": [{"prompt": "

Recall the point $(\\var{xbpoint},\\simplify[fractionnumbers]{{ybpoint}})$ is a representation of $x=\\var{xbpoint}$ and $y=\\simplify[fractionnumbers]{{ybpoint}}$. 

\n

Substitute $x=\\var{xbpoint}$ and $y=\\simplify[fractionnumbers]{{ybpoint}}$ into $\\simplify{{a}x+{b}y+{c}=0}$ and see if the left hand side equals the right hand side:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify[basic,fractionnumbers]{{a}*{xbpoint}+{b}*{ybpoint}+{c}}$$\\stackrel{?}{=}$$0$
$0$$=$$0$
\n

And so the point lies on the line.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify[basic,fractionnumbers]{{a}*{xbpoint}+{b}*{ybpoint}+{c}}$$\\stackrel{?}{=}$$0$
$\\simplify[all,fractionnumbers]{{lhs}}$$\\ne$$0$
\n

And so the point does not lie on the line.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "marks": 0, "scripts": {}, "maxMarks": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "statement": "", "variable_groups": [{"variables": ["grad", "yint", "xpoint", "possible", "ypoint", "check", "markinga"], "name": "part a"}, {"variables": ["a", "b", "c", "xbpoint", "possibleb", "ybpoint", "lhs", "checkb", "markingb"], "name": "part b"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"a": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "part b", "name": "a", "description": ""}, "c": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "part b", "name": "c", "description": ""}, "b": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "part b", "name": "b", "description": ""}, "possibleb": {"definition": "random(-10..10 except 0)", "templateType": "anything", "group": "part b", "name": "possibleb", "description": ""}, "ybpoint": {"definition": "random(possibleb,-(c+a*xbpoint)/b)", "templateType": "anything", "group": "part b", "name": "ybpoint", "description": ""}, "markinga": {"definition": "[if(check=true,1,0),if(check=true,0,1)]", "templateType": "anything", "group": "part a", "name": "markinga", "description": ""}, "xbpoint": {"definition": "random(-10..10 except -1..1)", "templateType": "anything", "group": "part b", "name": "xbpoint", "description": ""}, "yint": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "part a", "name": "yint", "description": ""}, "grad": {"definition": "random(6..6 except 0)", "templateType": "anything", "group": "part a", "name": "grad", "description": ""}, "checkb": {"definition": "if(possibleb=ybpoint,false,true)", "templateType": "anything", "group": "part b", "name": "checkb", "description": ""}, "possible": {"definition": "random(-12..12 except [0,-yint,yint])", "templateType": "anything", "group": "part a", "name": "possible", "description": ""}, "lhs": {"definition": "{a}*{xbpoint}+{b}*{ybpoint}+{c}", "templateType": "anything", "group": "part b", "name": "lhs", "description": ""}, "ypoint": {"definition": "grad*xpoint+random(yint,-yint,possible)", "templateType": "anything", "group": "part a", "name": "ypoint", "description": ""}, "xpoint": {"definition": "random(-10..10 except -1..1)", "templateType": "anything", "group": "part a", "name": "xpoint", "description": ""}, "check": {"definition": "ypoint=grad*xpoint+yint", "templateType": "anything", "group": "part a", "name": "check", "description": ""}, "markingb": {"definition": "[if(checkb=true,1,0),if(checkb=true,0,1)]", "templateType": "anything", "group": "part b", "name": "markingb", "description": ""}}, "metadata": {"notes": "

I think I have solved a rounding issue I was having.

", "description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}