// Numbas version: finer_feedback_settings {"name": "Simon's copy of Q3 Solve for x and y on a given triangle", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"lent11": {"definition": "random(20..28#5)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "lent11"}, "ans32": {"definition": "(lent31/(sin(radians(ang31))))*sin(radians(180-(ang32+ang31)))", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "ans32"}, "lent22": {"definition": "random(35..48)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "lent22"}, "ang31": {"definition": "random(71..85)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "ang31"}, "ans12": {"definition": "90-(degrees(arcsin(lent11/(lent12/(sin(radians(90)))))))", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "ans12"}, "lent12": {"definition": "random(41..51#2)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "lent12"}, "lent31": {"definition": "random(72..98#2)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "lent31"}, "ans33": {"definition": "0.5*lent31*h3", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "ans33"}, "ang32": {"definition": "random(47..55)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "ang32"}, "ans22": {"definition": "(lent21/(sin(radians(90))))*sin(radians(90-(ans21)))", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "ans22"}, "lent21": {"definition": "random(55..75)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "lent21"}, "h3": {"definition": "(ans32/(sin(radians(90))))*sin(radians(ang32))", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "h3"}, "ans21": {"definition": "degrees(arcsin(lent22/(lent21/(sin(radians(90))))))", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "ans21"}, "ans31": {"definition": "(lent31/(sin(radians(ang31))))*sin(radians(ang32))", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "ans31"}, "ans11": {"definition": "sqrt(lent12^2 - lent11^2)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "ans11"}, "l2": {"definition": "(ans32/(sin(radians(90))))*sin(radians(180-(ang32+90)))", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "l2"}}, "parts": [{"prompt": "

Find the values of x and y:

\n

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

\n

{tri2(lent21,lent22,ans22)}

\n

$x$ = [[0]]mm

\n

$Y$ = [[1]] $^{\\circ}$

", "showFeedbackIcon": true, "steps": [{"prompt": "

To find x: Use Pythagoras' Theorem to find the missing side.

\n

To find y: For the most accurate answer use the sides that were given. What trigonometric ratio includes those two sides? - sin.

\n

Remember to use the inverse $\\sin^{-1}$ to find the angle.

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

Find the values of x and y:

\n

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

\n

\n

{tri(lent11,lent12,ans12)}

\n

$X$ = [[0]] $^{\\circ}$

\n

$y$ = [[1]] mm

", "showFeedbackIcon": true, "variableReplacements": [], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "marks": 0, "extendBaseMarkingAlgorithm": true, "type": "gapfill", "gaps": [{"showFeedbackIcon": true, "variableReplacements": [], "strictPrecision": false, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "precision": "2", "minValue": "{ans12}", "type": "numberentry", "showPrecisionHint": false, "precisionType": "dp", "extendBaseMarkingAlgorithm": true, "correctAnswerStyle": "plain", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "marks": 1, "correctAnswerFraction": false, "precisionPartialCredit": 0, "scripts": {}, "maxValue": "{ans12}", "mustBeReduced": false, "unitTests": [], "precisionMessage": "You have not given your answer to the correct precision."}, {"showFeedbackIcon": true, "variableReplacements": [], "strictPrecision": false, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "precision": "2", "minValue": "{ans11}", "type": "numberentry", "showPrecisionHint": false, "precisionType": "dp", "extendBaseMarkingAlgorithm": true, "correctAnswerStyle": "plain", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "marks": 1, "correctAnswerFraction": false, "precisionPartialCredit": 0, "scripts": {}, "maxValue": "{ans11}", "mustBeReduced": false, "unitTests": [], "precisionMessage": "You have not given your answer to the correct precision."}], "unitTests": []}], "preamble": {"js": "", "css": ""}, "variable_groups": [], "extensions": [], "rulesets": {}, "ungrouped_variables": ["lent12", "lent11", "ans12", "ans11", "ans21", "lent21", "ans22", "ang31", "lent31", "ans31", "ang32", "ans32", "h3", "ans33", "l2", "lent22"], "statement": "

Use Pythagoras' Theorem and trigonometry to solve the following questions to 2 decimal places. 

\n

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

", "advice": "

(a)

\n

To find $x$ we can use Pythagoras' Theorem:

\n

$x^2+\\var{lent22}^2=\\var{lent21}^2$

\n

$x^2=\\var{lent21}^2-\\var{lent22}^2$

\n

$x=\\sqrt{\\var{lent21}^2-\\var{lent22}^2}=\\var{precround({ans22},2)}$ mm

\n

\n

To find $y$ we can use trigonometry as follows:

\n

$\\sin(Y) = \\frac{\\var{lent22}}{\\var{lent21}}$

\n

Therefore:

\n

$Y = \\sin^{-1}(\\frac{\\var{lent22}}{\\var{lent21}})=\\var{precround({ans21},2)}$

\n

\n

\n

(b)

\n

To find $X$ we can use trigonometry as follows:

\n

$\\cos(X) = \\frac{\\var{lent11}}{\\var{lent12}}$

\n

Therefore:

\n

$X = \\cos^{-1}(\\frac{\\var{lent11}}{\\var{lent12}})=\\var{precround({ans12},2)}$

\n

\n

To find $y$ we can use Pythagoras' Theorem:

\n

$y^2+\\var{lent11}^2=\\var{lent12}^2$

\n

$y^2=\\var{lent12}^2-\\var{lent11}^2$

\n

$y=\\sqrt{\\var{lent12}^2-\\var{lent11}^2}=\\var{precround({ans11},2)}$ mm

\n

\n

\n

\n

\n

\n

\n

\n

\n

", "functions": {"tri3": {"type": "html", "definition": "var 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(100,800);\n context.lineTo((l*8+100),800);\n context.lineTo((l2*8+100),(800-(h*8)));\n context.closePath();\n context.stroke();\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = l+'mm';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(((8*l)/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,(100+(4*(8*l))/5),(800-((h*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,(100+((8*l)/5)),(800-((h*8)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '12px sans-serif';\n var wstring = a1 + '\\xB0';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(90+((l2*8))),(845-((h*8))));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '12px sans-serif';\n var wstring = a2 + '\\xB0';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(120),(790));\n\n \n\n return c;\n ", "parameters": [["l", "number"], ["x", "number"], ["y", "number"], ["a1", "number"], ["a2", "number"], ["h", "number"], ["l2", "number"]], "language": "javascript"}, "tri": {"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+'mm';\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 = 'X';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(315),(815-(y*8)));\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 return c;\n\n ", "parameters": [["x", "number"], ["x1", "number"], ["y", "number"]], "language": "javascript"}, "tri2": {"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(200,800);\n context.lineTo((x*10+200),800);\n context.lineTo((200),(800-(l2*10)));\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,(200+((10*x)/2)),(820));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '12px sans-serif';\n var wstring = 'Y';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(150+(10*x)),790);\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = l1+'mm';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,(210+(10*x)/2),(800-((l2*10)/2)));\n\n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = l2+'mm';\n var tw = context.measureText(wstring).width;\n context.fillText(wstring,140,(800-((l2*10)/2)));\n\n \n return c;\n ", "parameters": [["l1", "number"], ["l2", "number"], ["x", "number"]], "language": "javascript"}}, "tags": [], "name": "Simon's copy of Q3 Solve for x and y on a given triangle", "metadata": {"description": "

Find angle and side in a right angled triangle.

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "variablesTest": {"condition": "", "maxRuns": 100}, "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/"}]}