// Numbas version: finer_feedback_settings {"name": "Pythagoras: calculating side length", "extensions": ["eukleides"], "custom_part_types": [], "resources": [["question-resources/Picture1_caMIdF1.png", "Picture1_caMIdF1.png"], ["question-resources/Picture2_6KE4ZpW.png", "Picture2_6KE4ZpW.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Pythagoras: calculating side length", "tags": [], "metadata": {"description": "
Draws a triangle based on 3 side lengths and randomises asking for hypotenuse or not.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "{max_height(25,diagram)}
", "advice": "Avoid using rounded values in calculations and just round for the final answer.
Pythagoras Theorem states that, in a right angled triangle, with hypotenuse $c$:
\\[a^2 + b^2 = c^2\\]
\nLet's call the unknown value $x$, therefore we can write:
\n$a = x$, $b =\\var{ac}$ and $c = \\var{ab}$
\nSo
\n\\[x^2 + \\var{ac}^2 = \\var{ab}^2 \\]
\nThis is equivalent to
\n\\[ \\begin{split} x^2 &= \\var{ab}^2 - \\var{ac}^2 \\\\ &= \\var{ab^2} - \\var{ac^2} \\\\ &= \\var{ab^2-ac^2} \\end{split}\\]
\nTherefore,
\n\\[ \\begin{split} x &= \\sqrt{\\var{ab^2-ac^2}} \\\\ &= \\var{precround(sqrt(ab^2-ac^2),3)} \\\\ &= \\var{ans} \\text{ (1 d.p.)} \\end{split} \\]
\n\n$a = \\var{bc}$, $b =\\var{ac}$ and $c = x$
\nSo
\\[\\var{bc}^2 + \\var{ac}^2 = x^2\\]
equivalently,
\n\\[ \\begin{split} x^2 &=\\var{bc}^2 + \\var{ac}^2 \\\\ &=\\var{bc^2} + \\var{ac^2} \\\\ &=\\var{bc^2 +ac^2} \\end{split}\\]
\nTherefore,
\n\\[ \\begin{split} x &= \\sqrt{\\var{bc^2 +ac^2}} \\\\ &= \\var{precround(sides_unrounded[2],3)} \\\\ &= \\var{ans} \\text{ (1 d.p.)} \\end{split} \\]
\n\n", "rulesets": {}, "extensions": ["eukleides"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"c": {"name": "c", "group": "Unnamed group", "definition": "[random(-5..5 #0.1),random(-5..5 #0.1)]", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Unnamed group", "definition": "[random(-5..5 #0.1 except c[0]),c[1]]", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Unnamed group", "definition": "[c[0],random(-5..5 #0.1 except c[1])]", "description": "", "templateType": "anything", "can_override": false}, "ab": {"name": "ab", "group": "Unnamed group", "definition": "precround(sqrt(ac^2 + bc^2),1)", "description": "", "templateType": "anything", "can_override": false}, "ac": {"name": "ac", "group": "Unnamed group", "definition": "precround(sqrt((a[0]-c[0])^2 + (a[1]-c[1])^2),1)", "description": "", "templateType": "anything", "can_override": false}, "bc": {"name": "bc", "group": "Unnamed group", "definition": "precround(sqrt((c[0]-b[0])^2 + (c[1]-b[1])^2),1)", "description": "", "templateType": "anything", "can_override": false}, "diagram": {"name": "diagram", "group": "Varying q and advice", "definition": "if(setup=1, diagram1, diagram2)", "description": "", "templateType": "anything", "can_override": false}, "questionside": {"name": "questionside", "group": "Varying q and advice", "definition": "\"Given a right angled triangle with one side $ \\\\var{ac} cm$ and a hypotenuse $\\\\var{ab} cm$, calculate the length of the unlabelled side.
\\n
Give your answer correct to 1 decimal place.
Given a right angled triangle with perpendicular sides $ \\\\var{ac} cm$ and $\\\\var{bc} cm$, calculate the length of the unlabelled side.
Give your answer correct to 1 decimal place.
{question}
\n", "minValue": "{ans}", "maxValue": "{ans}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "1", "precisionPartialCredit": 0, "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", "contributors": [{"name": "David Wishart", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1461/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "resources": ["question-resources/Picture1_caMIdF1.png", "question-resources/Picture2_6KE4ZpW.png"]}]}], "contributors": [{"name": "David Wishart", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1461/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}