// Numbas version: exam_results_page_options {"name": "Simon's copy of Q1.1 Pythagoras' Theorem", "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": [{"functions": {"tri5": {"language": "javascript", "parameters": [["x", "number"], ["y", "number"], ["z", "number"]], "type": "html", "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;"}, "tri7": {"language": "javascript", "parameters": [["x", "number"], ["x1", "number"], ["y", "number"]], "type": "html", "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 "}, "tri4": {"language": "javascript", "parameters": [["x", "number"], ["x1", "number"], ["y", "number"]], "type": "html", "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 "}, "tri": {"language": "javascript", "parameters": [["x", "number"], ["y", "number"], ["z", "number"]], "type": "html", "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 "}, "tri3": {"language": "javascript", "parameters": [["x", "number"], ["y", "number"], ["a", "number"]], "type": "html", "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 "}, "tri2": {"language": "javascript", "parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["d", "number"]], "type": "html", "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 "}, "tri6": {"language": "javascript", "parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["d", "number"]], "type": "html", "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 "}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Pythagoras' Theorem and naming sides of right angled triangle

\n

rebelmaths

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

Find the length of the unknown side using Pythagoras' Theorem, giving your answers to 2 d.p.

\n

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

", "extensions": [], "preamble": {"css": "", "js": ""}, "parts": [{"gaps": [{"notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showCorrectAnswer": true, "strictPrecision": false, "precisionType": "dp", "showPrecisionHint": false, "mustBeReducedPC": 0, "showFeedbackIcon": true, "allowFractions": false, "type": "numberentry", "correctAnswerStyle": "plain", "scripts": {}, "correctAnswerFraction": false, "mustBeReduced": false, "variableReplacements": [], "precision": "2", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "marks": 1, "maxValue": "{ans1}", "unitTests": [], "customMarkingAlgorithm": "", "minValue": "{ans1}", "precisionPartialCredit": 0}], "showCorrectAnswer": true, "sortAnswers": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "marks": 0, "scripts": {}, "showFeedbackIcon": true, "unitTests": [], "prompt": "

Find the value of x:

\n

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

\n

{tri5(lent1,lent2,ang1)}

\n

x = [[0]] mm

", "customMarkingAlgorithm": "", "type": "gapfill"}, {"gaps": [{"notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showCorrectAnswer": true, "strictPrecision": false, "precisionType": "dp", "showPrecisionHint": false, "mustBeReducedPC": 0, "showFeedbackIcon": true, "allowFractions": false, "type": "numberentry", "correctAnswerStyle": "plain", "scripts": {}, "correctAnswerFraction": false, "mustBeReduced": false, "variableReplacements": [], "precision": "2", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "marks": 1, "maxValue": "{ans2}", "unitTests": [], "customMarkingAlgorithm": "", "minValue": "{ans2}", "precisionPartialCredit": 0}], "showCorrectAnswer": true, "sortAnswers": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "marks": 0, "scripts": {}, "showFeedbackIcon": true, "unitTests": [], "prompt": "

Find the value of x:

\n

Note: The bottom left angle is a right angle (90$^{\\circ}$).

\n

{tri6(l21,l22,l23,ang2)}

\n

x = [[0]] mm

", "customMarkingAlgorithm": "", "type": "gapfill"}, {"gaps": [{"notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showCorrectAnswer": true, "strictPrecision": false, "precisionType": "dp", "showPrecisionHint": false, "mustBeReducedPC": 0, "showFeedbackIcon": true, "allowFractions": false, "type": "numberentry", "correctAnswerStyle": "plain", "scripts": {}, "correctAnswerFraction": false, "mustBeReduced": false, "variableReplacements": [], "precision": "2", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "marks": 1, "maxValue": "{ans3}", "unitTests": [], "customMarkingAlgorithm": "", "minValue": "{ans3}", "precisionPartialCredit": 0}], "showCorrectAnswer": true, "sortAnswers": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "marks": 0, "scripts": {}, "showFeedbackIcon": true, "unitTests": [], "prompt": "

Find the value of x:

\n

Note: The bottom left angle is a right angle (90$^{\\circ}$).

\n

{tri7(l31,l32,l33)}

\n

x = [[0]] mm

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

Remember Pythagoras' Theorem states that

\n

$a^2+b^2=c^2$ 

\n

where $c$ is the hypotenuse (the longest side)

\n

\n

(a)

\n

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

\n

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

\n

$x = \\var{precround(ans1,2)}$

\n

\n

(b)

\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{precround(ans2,2)}$

\n

\n

(c)

\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{precround(ans3,2)}$

", "rulesets": {}, "variable_groups": [], "name": "Simon's copy of Q1.1 Pythagoras' Theorem", "ungrouped_variables": ["ang1", "lent1", "ans1", "l21", "ang2", "lent2", "ans2", "l22", "l23", "l31", "l32", "l33", "ans3"], "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/"}]}