// Numbas version: exam_results_page_options {"name": "Linear Relations", "extensions": ["jsxgraph"], "custom_part_types": [{"source": {"pk": 1, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/1/edit"}, "name": "Yes/no", "short_name": "yes-no", "description": "
The student is shown two radio choices: \"Yes\" and \"No\". One of them is correct.
", "help_url": "", "input_widget": "radios", "input_options": {"correctAnswer": "if(eval(settings[\"correct_answer_expr\"]), 0, 1)", "hint": {"static": true, "value": ""}, "choices": {"static": true, "value": ["Yes", "No"]}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nif(studentanswer=correct_answer,\n correct(),\n incorrect()\n)\n\ninterpreted_answer:\nstudentAnswer=0\n\ncorrect_answer:\nif(eval(settings[\"correct_answer_expr\"]),0,1)", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=correct_answer,\n correct(),\n incorrect()\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer=0"}, {"name": "correct_answer", "description": "", "definition": "if(eval(settings[\"correct_answer_expr\"]),0,1)"}], "settings": [{"name": "correct_answer_expr", "label": "Is the answer \"Yes\"?", "help_url": "", "hint": "An expression which evaluates totrue
or false
.", "input_type": "mathematical_expression", "default_value": "true", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Linear Relations", "tags": [], "metadata": {"description": "This question asks the student to calculate three points of a given linear function then plot these points in a JSXGraph item and find the x and y intercepts of the line.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "Complete table
\nTo find the $y$ values, substitute the given $x$ values into the formula. The points will be:
\nFor $x=\\var{start}$
\n\\begin{align} y &=\\simplify[noLeadingMinus, unitfactor, zeroTerm, !collectNumbers]{{slope}*{start}+{intercept}}\\\\ &=\\simplify{{slope}*{start}+{intercept}} \\end{align}
\nFor $x=\\var{start+skip}$
\n\\begin{align} y &=\\simplify[noLeadingMinus, unitFactor, zeroTerm, !collectNumbers]{{slope}*{start+skip}+{intercept}}\\\\ &=\\simplify{{slope}*{start+skip}+{intercept}} \\end{align}
\nFor $x=\\var{start+2*skip}$
\n\\begin{align} y &=\\simplify[noLeadingMinus, unitFactor, zeroTerm, !collectNumbers]{{slope}*{start+2*skip}+{intercept}}\\\\ &=\\simplify{{slope}*{start+2*skip}+{intercept}} \\end{align}
\nPlot points
\n{answer_frame}
\n$y$ intercept
\nThe line will cross the $y$ axis at the point where $x=0$ in the formula, that is at the point $\\var{intercept}$.
\n$x$ intercept
\nThe line will cross the $x$ axis at the point where $y=0$, that is \\begin{align} 0 &= \\simplify{{slope}*x+{intercept}}\\\\ \\simplify{-{intercept}}&=\\simplify{{slope}*x}\\\\ x&=\\simplify{-{intercept}/{slope}} \\end{align}
\nOn line?
\nThe given point $\\var{transpose(random_point)}$ will be on the line if the $x$ and $y$ values of the point satisfy the formula. In this case we have \\begin{align} \\var{random_point[1]} &=\\simplify[noLeadingMinus, unitfactor, zeroTerm, !collectNumbers]{{slope}*{random_point[0]}+{intercept}}\\\\ &=\\simplify{{slope}*{random_point[0]}+{intercept}} \\end{align}
\nThis is clearly false, hence the point is not on the line.
\nThis is clearly true hence the point is on the line.
", "rulesets": {}, "extensions": ["jsxgraph"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"frame": {"name": "frame", "group": "Plot points", "definition": "jessiecode(800,500,[-8,{maxY}+1,8,-{maxY}-1],\"\"\"\n point({start},0) <First x value given to studnet
", "templateType": "anything", "can_override": false}, "skip": {"name": "skip", "group": "General", "definition": "random(1..3)", "description": "Skip between x values
", "templateType": "anything", "can_override": false}, "slope": {"name": "slope", "group": "General", "definition": "random(-2..2 except 0)", "description": "Slope of linear function
", "templateType": "anything", "can_override": false}, "intercept": {"name": "intercept", "group": "General", "definition": "random(-2..2)", "description": "y intercept of linear function
", "templateType": "anything", "can_override": false}, "target1": {"name": "target1", "group": "General", "definition": "vector(start,slope*start+intercept)", "description": "", "templateType": "anything", "can_override": false}, "target2": {"name": "target2", "group": "General", "definition": "vector(start+skip,slope*(start+skip)+intercept)", "description": "", "templateType": "anything", "can_override": false}, "target3": {"name": "target3", "group": "General", "definition": "vector(start+2*skip,slope*(start+2*skip)+intercept)", "description": "", "templateType": "anything", "can_override": false}, "maxY": {"name": "maxY", "group": "Plot points", "definition": "max([abs(target1[1]),abs(target2[1]),abs(target3[1])])", "description": "", "templateType": "anything", "can_override": false}, "multiplier": {"name": "multiplier", "group": "Plot points", "definition": "max(1,maxY/4)", "description": "", "templateType": "anything", "can_override": false}, "random_point": {"name": "random_point", "group": "On line", "definition": "vector(random_x, random_y[random(0,1)])", "description": "", "templateType": "anything", "can_override": false}, "answer_frame": {"name": "answer_frame", "group": "Plot points", "definition": "jessiecode(800,500,[-8,{maxY}+1,8,-{maxY}-1],\"\"\"\n point({target1[0]},{target1[1]}) <Complete the table below using the formula $y=\\simplify{{slope}*x+{intercept}}$.
\n$x$ | \n$\\var{target1[0]}$ | \n$\\var{target2[0]}$ | \n$\\var{target3[0]}$ | \n
$y$ | \n[[0]] | \n[[1]] | \n[[2]] | \n
{frame}
\nMove the points in the number plane above to the points you calculated in the previous part of the question.
"}, {"type": "numberentry", "useCustomName": true, "customName": "$y$ intercept", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "At what $y$ value does the line in the previous part cut the $y$ axis?
", "minValue": "intercept", "maxValue": "intercept", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "$x$ intercept", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "At what $x$ value does the line in the \"Plot points\" part cross the $x$ axis?
", "minValue": "-1*intercept/slope", "maxValue": "-1*intercept/slope", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "yes-no", "useCustomName": true, "customName": "On line?", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Does the point $(\\var{random_point[0]}, \\var{random_point[1]})$ lie on the line in the \"Plot points\" part?
", "settings": {"correct_answer_expr": "random_point[1]=slope*random_point[0]+intercept"}}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}, {"name": "Jim Pettigrew", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2037/"}, {"name": "Ulrich G\u00f6rtz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7603/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}, {"name": "Jim Pettigrew", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2037/"}, {"name": "Ulrich G\u00f6rtz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7603/"}]}