// Numbas version: exam_results_page_options {"name": "Simon'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, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "

Remember that:

\n

\n

-The hypotenuse (H) is the longest side. It is always opposite the right angle.

\n

-The adjacent (A) is the side between the right angle and the important angle.

\n

-The opposite (O) is the side opposite the important angle. It is the only side that doesn't touch the important angle.

\n

", "functions": {"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 ", "type": "html", "parameters": [["x", "number"], ["y", "number"], ["z", "number"]], "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 ", "type": "html", "parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["d", "number"]], "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;", "type": "html", "parameters": [["x", "number"], ["y", "number"], ["z", "number"]], "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 ", "type": "html", "parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["d", "number"]], "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 ", "type": "html", "parameters": [["x", "number"], ["x1", "number"], ["y", "number"]], "language": "javascript"}, "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 ", "type": "html", "parameters": [["x", "number"], ["x1", "number"], ["y", "number"]], "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 ", "type": "html", "parameters": [["x", "number"], ["y", "number"], ["a", "number"]], "language": "javascript"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ang1", "lent1", "ans1", "l21", "ang2", "lent2", "ans2", "l22", "l23", "l31", "l32", "l33", "ans3"], "statement": "

Using each right-angled triangle, write A, O or H in the answer boxes below to label Adjacent, Opposite or Hypotenuse sides.

\n

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

\n

\n

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

", "variables": {"l22": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "l22", "definition": "random(12..18)"}, "lent2": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "lent2", "definition": "random(45..60)"}, "l33": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "l33", "definition": "random(40..50)"}, "ang1": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "ang1", "definition": "random(63..65)"}, "ans3": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "ans3", "definition": "sqrt(l32^2-l31^2)"}, "l32": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "l32", "definition": "random(60..70)"}, "l31": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "l31", "definition": "random(30.5..45.5)"}, "ang2": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "ang2", "definition": "random(48..65)"}, "l21": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "l21", "definition": "random(30..45)"}, "ans1": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "definition": "sqrt(lent1^2+lent2^2)"}, "lent1": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "lent1", "definition": "random(25..35)"}, "ans2": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "definition": "sqrt(l21^2-l22^2)"}, "l23": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "l23", "definition": "random(9..15)"}}, "extensions": [], "metadata": {"description": "

Pythagoras' Theorem and naming sides of right angled triangle

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"css": "", "js": ""}, "parts": [{"extendBaseMarkingAlgorithm": true, "type": "gapfill", "scripts": {}, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "unitTests": [], "gaps": [{"vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "scripts": {}, "vsetRange": [0, 1], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "checkingAccuracy": 0.001, "unitTests": [], "answer": "O", "failureRate": 1, "expectedVariableNames": [], "showPreview": true, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": ""}, {"vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "scripts": {}, "vsetRange": [0, 1], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "checkingAccuracy": 0.001, "unitTests": [], "answer": "H", "failureRate": 1, "expectedVariableNames": [], "showPreview": true, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": ""}, {"vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "scripts": {}, "vsetRange": [0, 1], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "checkingAccuracy": 0.001, "unitTests": [], "answer": "A", "failureRate": 1, "expectedVariableNames": [], "showPreview": true, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": ""}], "sortAnswers": false, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

Note: The bottom right angle is 90$^{\\circ}$.

\n

{tri(30,45,56)}

\n

x = [[0]]

\n

y = [[1]]

\n

z = [[2]]

"}, {"extendBaseMarkingAlgorithm": true, "type": "gapfill", "scripts": {}, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "unitTests": [], "gaps": [{"vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "scripts": {}, "vsetRange": [0, 1], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "checkingAccuracy": 0.001, "unitTests": [], "answer": "O", "failureRate": 1, "expectedVariableNames": [], "showPreview": true, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": ""}, {"vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "scripts": {}, "vsetRange": [0, 1], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "checkingAccuracy": 0.001, "unitTests": [], "answer": "A", "failureRate": 1, "expectedVariableNames": [], "showPreview": true, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": ""}, {"vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "scripts": {}, "vsetRange": [0, 1], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "checkingAccuracy": 0.001, "unitTests": [], "answer": "H", "failureRate": 1, "expectedVariableNames": [], "showPreview": true, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": ""}], "sortAnswers": false, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

Note: The bottom left angle is 90$^{\\circ}$.

\n

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

\n

x = [[0]]

\n

y = [[1]]

\n

z = [[2]]

"}, {"extendBaseMarkingAlgorithm": true, "type": "gapfill", "scripts": {}, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "unitTests": [], "gaps": [{"vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "scripts": {}, "vsetRange": [0, 1], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "checkingAccuracy": 0.001, "unitTests": [], "answer": "H", "failureRate": 1, "expectedVariableNames": [], "showPreview": true, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": ""}, {"vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "scripts": {}, "vsetRange": [0, 1], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "checkingAccuracy": 0.001, "unitTests": [], "answer": "A", "failureRate": 1, "expectedVariableNames": [], "showPreview": true, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": ""}, {"vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "scripts": {}, "vsetRange": [0, 1], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "checkingAccuracy": 0.001, "unitTests": [], "answer": "O", "failureRate": 1, "expectedVariableNames": [], "showPreview": true, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": ""}], "sortAnswers": false, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

Note: The bottom left angle is 90$^{\\circ}$.

\n

{tri3(10,33,73)}

\n

x = [[0]]

\n

y = [[1]]

\n

z = [[2]]

"}, {"extendBaseMarkingAlgorithm": true, "type": "gapfill", "scripts": {}, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "unitTests": [], "gaps": [{"vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "scripts": {}, "vsetRange": [0, 1], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "checkingAccuracy": 0.001, "unitTests": [], "answer": "A", "failureRate": 1, "expectedVariableNames": [], "showPreview": true, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": ""}, {"vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "scripts": {}, "vsetRange": [0, 1], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "checkingAccuracy": 0.001, "unitTests": [], "answer": "O", "failureRate": 1, "expectedVariableNames": [], "showPreview": true, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": ""}, {"vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "scripts": {}, "vsetRange": [0, 1], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "checkingAccuracy": 0.001, "unitTests": [], "answer": "H", "failureRate": 1, "expectedVariableNames": [], "showPreview": true, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": ""}], "sortAnswers": false, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

Note: The top right angle is90$^{\\circ}$.

\n

{tri4(60,78,48)}

\n

x = [[0]]

\n

y = [[1]]

\n

z = [[2]]

"}], "variable_groups": [], "tags": [], "name": "Simon's copy of Q1.1 Pythagoras' Theorem and naming sides of right angled triangle", "rulesets": {}, "type": "question", "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}