// Numbas version: finer_feedback_settings
{"name": "Linear graphs: Calculate length of a line segment", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Linear graphs: Calculate length of a line segment", "tags": ["Category: Linear Graphs"], "metadata": {"description": "
Calculate the length of a line segment given two points
", "licence": "None specified"}, "statement": "Find the length of the line segment between:
\n$(\\var{ax},\\var{ay})$ and $(\\var{bx}, \\var{by})$.
", "advice": "The best way to answer this question is using Pythagoras' Theorem $a^2 + b^2 = c^2$ and a sketch.
\n{app2}
Use the given points as two vertices and create a right angled triangle:
{app1}
\n\\[ \\begin{split}
&\\, a^2 + b^2 = c^2 \\\\
&\\, (\\var{bx} - \\var{ax})^2 + (\\var{by} - \\var{ay})^2 = c^2 \\\\
&\\, (\\var{bx-ax})^2 + (\\var{by-ay})^2 = c^2 \\\\
&\\, \\var{(ax-bx)^2 + (ay-by)^2} = c^2 \\\\
&\\,\\sqrt{\\var{(ax-bx)^2 + (ay-by)^2}}= c \\\\
&\\,\\var{sqrt((ax-bx)^2 + (ay-by)^2)}= c \\\\
&\\, c = \\var{csimp} \\text{ units} \\\\
\\end{split} \\]
", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"ax": {"name": "ax", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "", "templateType": "anything", "can_override": false}, "bx": {"name": "bx", "group": "Ungrouped variables", "definition": "random(-5..5 except ax)", "description": "", "templateType": "anything", "can_override": false}, "ay": {"name": "ay", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "by": {"name": "by", "group": "Ungrouped variables", "definition": "random(-5..5 except ay)", "description": "", "templateType": "anything", "can_override": false}, "length": {"name": "length", "group": "Ungrouped variables", "definition": "sqrt((ax-bx)^2 + (ay-by)^2)", "description": "", "templateType": "anything", "can_override": false}, "P1": {"name": "P1", "group": "Ungrouped variables", "definition": "vector(ax,ay)", "description": "", "templateType": "anything", "can_override": false}, "P2": {"name": "P2", "group": "Ungrouped variables", "definition": "vector(bx,by)", "description": "", "templateType": "anything", "can_override": false}, "P3": {"name": "P3", "group": "Ungrouped variables", "definition": "vector(ax,by)", "description": "", "templateType": "anything", "can_override": false}, "app1": {"name": "app1", "group": "Ungrouped variables", "definition": "geogebra_applet(\n 600,600,\n [\n A: [\n definition: p1,\n label_visible: false\n ],\n B: [\n definition: P2,\n label_visible: false\n ],\n C: [\n definition: P3,\n label_visible: false\n ],\n \n c:[\n definition: \"Segment(A,B)\"\n ],\n \n b:[\n definition: \"Segment(A,C)\"\n ],\n \n a:[\n definition: \"Segment(C,B)\"\n ]\n \n ]\n)", "description": "", "templateType": "anything", "can_override": false}, "app2": {"name": "app2", "group": "Ungrouped variables", "definition": "geogebra_applet(\n 600,600,\n [\n A: [\n definition: p1,\n label_visible: false\n ],\n B: [\n definition: P2,\n label_visible: false\n ],\n \n \n c:[\n definition: \"Segment(A,B)\",\n label_visible: false\n ]\n \n \n ]\n)", "description": "", "templateType": "anything", "can_override": false}, "csimp": {"name": "csimp", "group": "Ungrouped variables", "definition": "precround(length,1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ax", "bx", "ay", "by", "length", "P1", "P2", "P3", "app1", "app2", "csimp"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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": "length", "maxValue": "length", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "1", "precisionPartialCredit": "100", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}]}]}], "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}]}