// Numbas version: exam_results_page_options {"name": "Maria's copy of Q1.1 Pythagoras' Theorem and naming sides of right angled triangle", "extensions": [], "custom_part_types": [], "resources": [["question-resources/Q2_0UOrG2O.png", "/srv/numbas/media/question-resources/Q2_0UOrG2O.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

Pythagoras' Theorem and naming sides of right angled triangle

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"css": "", "js": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"l23": {"group": "Ungrouped variables", "name": "l23", "templateType": "anything", "description": "", "definition": "random(9..15)"}, "l31": {"group": "Ungrouped variables", "name": "l31", "templateType": "anything", "description": "", "definition": "random(30.5..45.5)"}, "l32": {"group": "Ungrouped variables", "name": "l32", "templateType": "anything", "description": "", "definition": "random(60..70)"}, "lent1": {"group": "Ungrouped variables", "name": "lent1", "templateType": "anything", "description": "", "definition": "random(25..35)"}, "l33": {"group": "Ungrouped variables", "name": "l33", "templateType": "anything", "description": "", "definition": "random(40..50)"}, "ans3": {"group": "Ungrouped variables", "name": "ans3", "templateType": "anything", "description": "", "definition": "sqrt(l32^2-l31^2)"}, "ang2": {"group": "Ungrouped variables", "name": "ang2", "templateType": "anything", "description": "", "definition": "random(48..65)"}, "lent2": {"group": "Ungrouped variables", "name": "lent2", "templateType": "anything", "description": "", "definition": "random(45..60)"}, "ang1": {"group": "Ungrouped variables", "name": "ang1", "templateType": "anything", "description": "", "definition": "random(63..65)"}, "ans1": {"group": "Ungrouped variables", "name": "ans1", "templateType": "anything", "description": "", "definition": "sqrt(lent1^2+lent2^2)"}, "ans2": {"group": "Ungrouped variables", "name": "ans2", "templateType": "anything", "description": "", "definition": "sqrt(l21^2-l22^2)"}, "l21": {"group": "Ungrouped variables", "name": "l21", "templateType": "anything", "description": "", "definition": "random(30..45)"}, "l22": {"group": "Ungrouped variables", "name": "l22", "templateType": "anything", "description": "", "definition": "random(12..18)"}}, "name": "Maria's copy of Q1.1 Pythagoras' Theorem and naming sides of right angled triangle", "ungrouped_variables": ["ang1", "lent1", "ans1", "l21", "ang2", "lent2", "ans2", "l22", "l23", "l31", "l32", "l33", "ans3"], "rulesets": {}, "advice": "

$x^2 = \\var{lent1}^2 + \\var{lent2}^2$

\n

$x = \\sqrt(\\var{lent1}^2 + \\var{lent2}^2)$

\n

$x = \\var{ans1}$

\n

\n

$\\var{l21}^2 = x^2 + \\var{l22}^2$

\n

$x^2 = \\var{l21}^2 - \\var{l22}^2$

\n

$x = \\sqrt(\\var{l21}^2 - \\var{l22}^2)$

\n

$x = \\var{ans2}$

\n

\n

$\\var{l32}^2 = x^2 + \\var{l31}^2$

\n

$x^2 = \\var{l32}^2 - \\var{l31}^2$

\n

$x = \\sqrt(\\var{l32}^2 - \\var{l31}^2)$

\n

$x = \\var{ans3}$

", "statement": "

Write Adjacent, Opposite or Hypotenuse in the label answer boxes that correspond to the triangle above them, in parts(a - d).

\n

The angle labelled \"ang\" is the important one in each case.

\n

In parts(e - g), find the length of the unknown side using Pythagorass Theorem.

\n

Solve the following mensuration questions to 2 decimal places:

\n

Note: You may need to scroll down to see the diagrams.

", "functions": {"tri4": {"definition": "\nvar c = document.createElement('canvas');\n $(c).attr('width',900).attr('height',900);\n var context = c.getContext('2d');\n\n context.beginPath();\n context.moveTo(300,(800-(y*8)));\n context.lineTo((x*8+300),800-(y*8));\n context.lineTo((x*8+300),(800));\n context.closePath();\n context.stroke();\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'X';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(300+((8*x)/2)),790-(y*8));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'Z';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(400+((8*x)/8)),(800-((y*8)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '12px sans-serif';\n var wstring = 'Ang';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(300+((8*x)/8)),(820-((y*8))));\n\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'Y';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(310+((8*x))),(800-((y*8)/2)));\n\n \n\n return c;\n ", "parameters": [["x", "number"], ["x1", "number"], ["y", "number"]], "type": "html", "language": "javascript"}, "tri": {"definition": "\nvar c = document.createElement('canvas');\n$(c).attr('width',700).attr('height',900);\n var context = c.getContext('2d');\n\n context.beginPath();\n context.moveTo(300,800);\n context.lineTo((x*8+300),800);\n context.lineTo((x*8+300),(800-(y*8)));\n context.closePath();\n context.stroke();\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'Z';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(300+((8*x)/2)),820);\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'X';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(320+((8*x))),(800-((y*8)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'Y';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(280+((8*x)/2)),(800-((y*8)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '12px sans-serif';\n var wstring = 'Ang';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,315,790);\n\n \n return c;\n ", "parameters": [["x", "number"], ["y", "number"], ["z", "number"]], "type": "html", "language": "javascript"}, "tri2": {"definition": "x=b\ny=c\n\nvar c = document.createElement('canvas');\n $(c).attr('width',900).attr('height',900);\n var context = c.getContext('2d');\n\n context.beginPath();\n context.moveTo(300,800);\n context.lineTo((x*12+300),800);\n context.lineTo((300),(800-(y*12)));\n context.closePath();\n context.stroke();\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'Z';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(300+((12*x)/2)),(800-((y*12)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'x';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(300+((12*x)/2)),820);\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'y';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,280,(800-((y*12)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '12px sans-serif';\n var wstring = 'Ang';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,305,(840-(y*12)));\n\n \n\n return c;\n ", "parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["d", "number"]], "type": "html", "language": "javascript"}, "tri7": {"definition": "\nvar c = document.createElement('canvas');\n$(c).attr('width',900).attr('height',900);\n var context = c.getContext('2d');\n\n context.beginPath();\n context.moveTo(300,(800-(y*8)));\n context.lineTo((x*8+300),800-(y*8));\n context.lineTo((x*8+300),(800));\n context.closePath();\n context.stroke();\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'X';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(300+((8*x)/2)),790-(y*8));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = x1 + 'mm';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(300+((8*x)/8)),(800-((y*8)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '12px sans-serif';\n var wstring = 'Ang';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(300+((8*x)/8)),(820-((y*8))));\n\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = x+'mm';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(310+((8*x))),(800-((y*8)/2)));\n\n \n\n return c;\n ", "parameters": [["x", "number"], ["x1", "number"], ["y", "number"]], "type": "html", "language": "javascript"}, "tri6": {"definition": "x=b\ny=c\n\nvar c = document.createElement('canvas');\n $(c).attr('width',900).attr('height',900);\n var context = c.getContext('2d');\n\n context.beginPath();\n context.moveTo(300,800);\n context.lineTo((x*12+300),800);\n context.lineTo((300),(800-(y*12)));\n context.closePath();\n context.stroke();\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = a+'mm';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(300+((12*x)/2)),(800-((y*12)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'X';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(300+((12*x)/2)),820);\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = x+'mm';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,240,(800-((y*12)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '12px sans-serif';\n var wstring = 'Ang';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,305,(840-(y*12)));\n\n \n\n return c;\n ", "parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["d", "number"]], "type": "html", "language": "javascript"}, "tri5": {"definition": "var c = document.createElement('canvas');\n$(c).attr('width',700).attr('height',900);\n var context = c.getContext('2d');\n\n context.beginPath();\n context.moveTo(300,800);\n context.lineTo((x*8+300),800);\n context.lineTo((x*8+300),(800-(y*8)));\n context.closePath();\n context.stroke();\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = x+'mm';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(300+((8*x)/2)),820);\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = y+'mm';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(320+((8*x))),(800-((y*8)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'X';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(280+((8*x)/2)),(800-((y*8)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '12px sans-serif';\n var wstring = 'Ang';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,315,790);\n\n \n return c;", "parameters": [["x", "number"], ["y", "number"], ["z", "number"]], "type": "html", "language": "javascript"}, "tri3": {"definition": "\nvar c = document.createElement('canvas');\n $(c).attr('width',900).attr('height',900);\n var context = c.getContext('2d');\n\n context.beginPath();\n context.moveTo(300,800);\n context.lineTo((x*12+300),800);\n context.lineTo((300),(800-(y*12)));\n context.closePath();\n context.stroke();\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'y';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(300+((12*x)/2)),815);\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'x';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(310+((12*x)/2)),(800-(y*12)/2));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'Z';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,270,(800-((y*12)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '12px sans-serif';\n var wstring = 'Ang';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(250+(x*12)),790);\n\n \n\n return c;\n ", "parameters": [["x", "number"], ["y", "number"], ["a", "number"]], "type": "html", "language": "javascript"}}, "variable_groups": [], "parts": [{"stepsPenalty": 0, "gaps": [{"checkVariableNames": false, "vsetRangePoints": 5, "answer": "Opposite", "valuegenerators": [{"name": "opposite", "value": ""}], "checkingAccuracy": 0.001, "showPreview": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "unitTests": [], "variableReplacements": [], "type": "jme", "scripts": {}, "failureRate": 1, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "marks": 1, "customName": ""}, {"checkVariableNames": false, "vsetRangePoints": 5, "answer": "Hypotenuse", "valuegenerators": [{"name": "hypotenuse", "value": ""}], "checkingAccuracy": 0.001, "showPreview": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "unitTests": [], "variableReplacements": [], "type": "jme", "scripts": {}, "failureRate": 1, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "marks": 1, "customName": ""}, {"checkVariableNames": false, "vsetRangePoints": 5, "answer": "Adjacent", "valuegenerators": [{"name": "adjacent", "value": ""}], "checkingAccuracy": 0.001, "showPreview": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "unitTests": [], "variableReplacements": [], "type": "jme", "scripts": {}, "failureRate": 1, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "marks": 1, "customName": ""}], "sortAnswers": false, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "steps": [{"showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "unitTests": [], "variableReplacements": [], "type": "information", "scripts": {}, "prompt": " The hypotenuse is the side across from the right angle. \n The line touching the important angle is called it's adjacent line. \n The line opposite the important angle is called it's opposite line. ", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "marks": 0, "customName": ""}], "unitTests": [], "variableReplacements": [], "type": "gapfill", "scripts": {}, "prompt": " Write the name of each side in the correct box: \n Note: The bottom right angle is a right angle (90$^{\\circ}$). \n {tri(30,45,56)} \n x = [[0]] \n y = [[1]] \n z = [[2]] ", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "marks": 0, "customName": ""}, {"gaps": [{"checkVariableNames": false, "vsetRangePoints": 5, "answer": "Opposite", "valuegenerators": [{"name": "opposite", "value": ""}], "checkingAccuracy": 0.001, "showPreview": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "unitTests": [], "variableReplacements": [], "type": "jme", "scripts": {}, "failureRate": 1, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "marks": 1, "customName": ""}, {"checkVariableNames": false, "vsetRangePoints": 5, "answer": "Adjacent", "valuegenerators": [{"name": "adjacent", "value": ""}], "checkingAccuracy": 0.001, "showPreview": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "unitTests": [], "variableReplacements": [], "type": "jme", "scripts": {}, "failureRate": 1, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "marks": 1, "customName": ""}, {"checkVariableNames": false, "vsetRangePoints": 5, "answer": "Hypotenuse", "valuegenerators": [{"name": "hypotenuse", "value": ""}], "checkingAccuracy": 0.001, "showPreview": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "unitTests": [], "variableReplacements": [], "type": "jme", "scripts": {}, "failureRate": 1, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "marks": 1, "customName": ""}], "sortAnswers": false, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "unitTests": [], "variableReplacements": [], "type": "gapfill", "scripts": {}, "prompt": " Write the name of each side in the correct box: \n Note: The bottom left angle is a right angle (90$^{\\circ}\$).

\n

{tri2(25,19,16,48)}

\n

x = [[0]]

\n

y = [[1]]

\n

z = [[2]]

", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "marks": 0, "customName": ""}], "extensions": [], "tags": [], "type": "question", "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}]}], "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}