// Numbas version: exam_results_page_options {"name": "Pythagoras: calculating side length", "extensions": ["eukleides"], "custom_part_types": [], "resources": [["question-resources/Picture1_caMIdF1.png", "/srv/numbas/media/question-resources/Picture1_caMIdF1.png"], ["question-resources/Picture2_6KE4ZpW.png", "/srv/numbas/media/question-resources/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": "

\n

{advice}

", "rulesets": {}, "extensions": ["eukleides"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "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.

\"", "description": "", "templateType": "long string", "can_override": false}, "questionhyp": {"name": "questionhyp", "group": "Varying q and advice", "definition": "\"

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.

\"", "description": "", "templateType": "long string", "can_override": false}, "question": {"name": "question", "group": "Varying q and advice", "definition": "if(setup=1,questionside,questionhyp)", "description": "", "templateType": "anything", "can_override": false}, "setup": {"name": "setup", "group": "Varying q and advice", "definition": "random(1,2)", "description": "", "templateType": "anything", "can_override": false}, "answerside": {"name": "answerside", "group": "Varying q and advice", "definition": "bc", "description": "", "templateType": "anything", "can_override": false}, "answerhyp": {"name": "answerhyp", "group": "Varying q and advice", "definition": "ab", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Varying q and advice", "definition": "if(setup=1,answerside,answerhyp)", "description": "", "templateType": "anything", "can_override": false}, "diagram1": {"name": "diagram1", "group": "Varying q and advice", "definition": "eukleides(\"A right-angled triangle\",\n let(\n a, point(a[0],a[1])\n , b, point(b[0],b[1])\n , c, point(c[0],c[1])\n\n , [\n \n a..b..c\n , angle(a,c,b) right\n , a..b label(ab)\n , a..c label(ac)\n , a label('A')\n , b label('B')\n , c label('C')\n \n ]\n )\n)", "description": "", "templateType": "anything", "can_override": false}, "diagram2": {"name": "diagram2", "group": "Varying q and advice", "definition": "eukleides(\"A right-angled triangle\",\n let(\n a, point(a[0],a[1])\n , b, point(b[0],b[1])\n , c, point(c[0],c[1])\n\n , [\n \n a..b..c\n , angle(a,c,b) right\n , b..c label(bc)\n , a..c label(ac)\n , a label('A')\n , b label('B')\n , c label('C')\n \n ]\n )\n)", "description": "", "templateType": "anything", "can_override": false}, "advice": {"name": "advice", "group": "Varying q and advice", "definition": "if(setup=1,advice1,advice2)", "description": "", "templateType": "anything", "can_override": false}, "advice2": {"name": "advice2", "group": "Varying q and advice", "definition": "\"

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$:

\\n

\\\\[a^2 + b^2 = c^2\\\\]

\\n

Let\\'s call the unknown value $x$, therefore we can write:

\\n

$a = \\\\var{bc}$,  $b =\\\\var{ac}$ and $c = x$

\\n

So

\\\\[\\\\var{bc}^2 + \\\\var{ac}^2 = x^2\\\\]

\\n

equivalently,

\\n

\\\\[x^2 =\\\\var{bc}^2 + \\\\var{ac}^2\\\\]

\\n

and therefore

\\n

\\\\[x^2 = \\\\var{bc^2} + \\\\var{ac^2}\\\\]

\\\\[x = \\\\sqrt{\\\\var{bc^2} + \\\\var{ac^2}}\\\\]

\\n

\\\\[x = \\\\sqrt{\\\\var{bc^2+ac^2}}\\\\]

$x = \\\\var{ab}$ to 1dp.

\"", "description": "", "templateType": "long string", "can_override": false}, "advice1": {"name": "advice1", "group": "Varying q and advice", "definition": "\"

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$:

\\n

\\\\[a^2 + b^2 = c^2\\\\]

\\n

Let\\'s call the unknown value $x$, therefore we can write:

\\n

$a = x$,  $b =\\\\var{ac}$ and $c = \\\\var{ab}$

\\n

So

\\n

\\\\[x^2 + \\\\var{ac}^2 = \\\\var{ab}^2\\\\]

\\n

and therefore

\\n

\\\\[x^2 + \\\\var{ac^2} = \\\\var{ab^2}\\\\]

\\n

\\\\[x^2 = \\\\var{ab^2} - \\\\var{ac^2}\\\\]

\\n

\\\\[x = \\\\sqrt{\\\\var{ab^2-ac^2}}\\\\]

$x = \\\\var{bc}$ to 1dp.

\"", "description": "", "templateType": "long string", "can_override": false}}, "variablesTest": {"condition": "12 > ab > 1.5 &&\n12 > bc > 1.5 &&\n12 > ac > 1.5", "maxRuns": "10"}, "ungrouped_variables": [], "variable_groups": [{"name": "Unnamed group", "variables": ["c", "b", "a", "ab", "ac", "bc"]}, {"name": "Varying q and advice", "variables": ["questionside", "diagram", "questionhyp", "question", "setup", "answerside", "answerhyp", "ans", "diagram1", "diagram2", "advice", "advice2", "advice1"]}], "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, "prompt": "

{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/"}]}]}], "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/"}]}