// Numbas version: finer_feedback_settings {"name": "StraightLine", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "StraightLine", "tags": [], "metadata": {"description": "
Students are supposed to use Excel (or similar) to find the answers (e.g., enter coordinates of two points then plot and add trendline).
Uses an embedded Geogebra graph of a line $y=mx+c$ with random coefficients set by NUMBAS.
", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "statement": "{geogebra_applet('https://www.geogebra.org/m/rsb3yw2a', defs, [])}
\nConsidering the above straight line, answer the following questions:
", "advice": "Use relevant formulas (e.g., $m=\\frac{y_2-y_1}{x_2-x_1}$ for slope) or spreadsheet functions (e.g., SLOPE/INTERCEPT).
", "rulesets": {}, "extensions": ["geogebra"], "variables": {"y1": {"name": "y1", "group": "Ungrouped variables", "definition": "m*x1+c", "description": "", "templateType": "anything"}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "(random(random(0..3 except 0),random(1/2,2/3,1/4,3/4,1/3)))*random(-1,1)", "description": "", "templateType": "anything"}, "defs": {"name": "defs", "group": "Ungrouped variables", "definition": "[\n ['m',m],\n ['c',c]\n]", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-4..4 except 0)", "description": "", "templateType": "anything"}, "x1": {"name": "x1", "group": "Ungrouped variables", "definition": "random(0.1..0.9#0.01)", "description": "", "templateType": "anything"}, "x2": {"name": "x2", "group": "Ungrouped variables", "definition": "(y2-c)/m", "description": "", "templateType": "anything"}, "y2": {"name": "y2", "group": "Ungrouped variables", "definition": "random(0.1..0.9#0.01)", "description": "", "templateType": "anything"}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.04", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": "200"}, "ungrouped_variables": ["defs", "m", "c", "tol", "x1", "y1", "y2", "x2"], "variable_groups": [], "functions": {"graph3": {"parameters": [], "type": "html", "language": "jme", "definition": ""}, "graph": {"parameters": [], "type": "html", "language": "jme", "definition": ""}, "graph2": {"parameters": [], "type": "html", "language": "jme", "definition": ""}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "What is the slope?
", "minValue": "{m}*(1-tol)", "maxValue": "{m}*(1+tol)", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "What is the intercept?
", "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "{c}*(1-tol)", "maxValue": "{c}*(1+tol)", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "{c}*(1-tol)", "maxValue": "{c}*(1+tol)", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "c", "part": "p1", "must_go_first": false}, {"variable": "m", "part": "p0", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": "0.5", "exploreObjective": null, "prompt": "What is $y$ when $x=\\var{x1}$?
", "minValue": "y1*(1+tol)", "maxValue": "y1*(1-tol)", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "c", "part": "p1", "must_go_first": false}, {"variable": "m", "part": "p0", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": "0.5", "exploreObjective": null, "prompt": "What is $x$ when $y=\\var{y2}$?
", "minValue": "x2*(1+tol)", "maxValue": "x2*(1-tol)", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}, {"name": "Mark Hodds", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/510/"}]}]}], "contributors": [{"name": "Mario Orsi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/427/"}, {"name": "Mark Hodds", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/510/"}]}