// Numbas version: finer_feedback_settings {"name": "write the line equation", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "write the line equation", "tags": [], "metadata": {"description": "
Students are shown a line graph and asked to write the line equation.
\nThe line is drawn in geogebra. m and b are randomised.
\nThe line equation is given as a fill-in-the-gaps, y = <gap>x + <gap>
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "What is the equation for the following graph?
\n{geogebra_applet('https://www.geogebra.org/m/wxv4ykqj',defs)}
", "advice": "The line formula is in the form $y=mx+b$, where $m$ is the gradient, and $b$ is the $y$-intercept.
\nThe gradient is given by $\\frac{vertical \\, rise}{horizontal \\, run} = \\var{m}$.
\nThe $y$-intercept is $\\var{b}$.
\nSo the equation is $y = \\var{dispm}x \\var{dispb}$.
", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"m": {"name": "m", "group": "Ungrouped variables", "definition": "random(-2,-1,-0.5,0.5,1,2)", "description": "line gradient
", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "line y-intercept
", "templateType": "anything", "can_override": false}, "defs": {"name": "defs", "group": "Ungrouped variables", "definition": "[\n ['a',m],['b',b],['xmin',-5],['xmax',5],['ymin',ymin],['ymax',ymax]\n ]", "description": "line variables to feed to Geogebra
", "templateType": "anything", "can_override": false}, "ymin": {"name": "ymin", "group": "Ungrouped variables", "definition": "b - max(m*(-5),m*5) - 2", "description": "minimum y-value displayed on graph
", "templateType": "anything", "can_override": false}, "ymax": {"name": "ymax", "group": "Ungrouped variables", "definition": "b + max(m*(-5),m*5) + 2", "description": "maximum y-value displayed on graph
", "templateType": "anything", "can_override": false}, "dispm": {"name": "dispm", "group": "Ungrouped variables", "definition": "if(m=1,\"\",if(m=-1,\"$-$\",\"$\\\\var{m}$\"))", "description": "", "templateType": "anything", "can_override": false}, "dispb": {"name": "dispb", "group": "Ungrouped variables", "definition": "if(b=0,'',if (b>0,'$+\\\\var{b}$','$\\\\var{b}$'))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["m", "b", "defs", "ymin", "ymax", "dispm", "dispb"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$y = $ [[0]] $x + $ [[1]]
", "gaps": [{"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": "m", "maxValue": "m", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "b", "maxValue": "b", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "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/"}]}