// Numbas version: exam_results_page_options {"name": "s2-trig", "metadata": {"description": "
This is a set of practice questions for the non-right-angle trig component of the Australian year 12 Mathematics Standard 2 course.
\n\nIt asks questions about
\nStudents are shown a right angled triangle and asked to find the value of an angle using a trig identity.
\nThe triangle is a fixed image, but the angles and side lengths are randomly selected.
\nThe angle is to be given in degrees and minutes.
\nThere are 4 orientations of the triangle in the diagram. The orientation is randomly chosen.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "\n
Note that this diagram is not drawn to scale.
", "advice": "To find the value for {chosenangle} in this diagram, we need to use the {chosensct} ratio.
\n$\\var{chosensct}(\\var{anglestring}) = \\frac{\\var{num}}{\\var{den}} $
\n$\\var{anglestring}= \\var{chosensct}^{-1}(\\frac{\\var{num}}{\\var{den}})$
\n$\\var{anglestring}=\\var{matrix2row[0]}$
\nWhen we convert this to degrees, minutes and seconds we get:
\n$\\var{anglestring}=\\var{answerfull}$
\nWhen we round this to the nearest minute, we get:
\n$\\var{anglestring}=\\var{answer}$
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"sct": {"name": "sct", "group": "random variables", "definition": "random(0,1,2)", "description": "0 = sin
\n1 = cos
\n2 = tan
", "templateType": "anything", "can_override": false}, "angleA": {"name": "angleA", "group": "random variables", "definition": "dec(random(1500..4000)/100)", "description": "", "templateType": "anything", "can_override": false}, "angleB": {"name": "angleB", "group": "random variables", "definition": "90-angleA", "description": "", "templateType": "anything", "can_override": false}, "sidec": {"name": "sidec", "group": "random variables", "definition": "dec(random(10..500)/10)", "description": "", "templateType": "anything", "can_override": false}, "sideb": {"name": "sideb", "group": "random variables", "definition": "dec(round(sidec*cos(angleArad)*10)/10)", "description": "", "templateType": "anything", "can_override": false}, "angleArad": {"name": "angleArad", "group": "Ungrouped variables", "definition": "radians(angleA)", "description": "", "templateType": "anything", "can_override": false}, "angleBrad": {"name": "angleBrad", "group": "Ungrouped variables", "definition": "radians(angleB)", "description": "", "templateType": "anything", "can_override": false}, "sidea": {"name": "sidea", "group": "random variables", "definition": "dec((round(sidec*sin(angleArad)*10))/10)", "description": "", "templateType": "anything", "can_override": false}, "matrix1": {"name": "matrix1", "group": "Ungrouped variables", "definition": "[['A', '', sidea, '', sidec],\n ['','B', '', sideb, sidec],\n ['A', '', '', sideb, sidec],\n ['', 'B', sidea, '', sidec],\n ['A', '', sidea, sideb, ''],\n ['', 'B', sidea, sideb, '']]", "description": "columns: sin A, sin B, cos A, cos B, tan A, tan B
\nrows: angle A, angle B, side a, side b, side c
", "templateType": "anything", "can_override": false}, "angle": {"name": "angle", "group": "random variables", "definition": "random(0,1)", "description": "0 means angle A is given
\n1 means angle B is given
", "templateType": "anything", "can_override": false}, "matrix1row": {"name": "matrix1row", "group": "Ungrouped variables", "definition": "matrix1[2*sct+angle]", "description": "", "templateType": "anything", "can_override": false}, "aA": {"name": "aA", "group": "display variables", "definition": "if(matrix1row[0]='','','A')", "description": "", "templateType": "anything", "can_override": false}, "aB": {"name": "aB", "group": "display variables", "definition": "if(matrix1row[1]='','','B')", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "display variables", "definition": "matrix1row[2]", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "display variables", "definition": "matrix1row[3]", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "display variables", "definition": "matrix1row[4]", "description": "", "templateType": "anything", "can_override": false}, "sctchoices": {"name": "sctchoices", "group": "display variables", "definition": "['sin','cos','tan']", "description": "", "templateType": "anything", "can_override": false}, "anglechoices": {"name": "anglechoices", "group": "display variables", "definition": "['A','B']", "description": "", "templateType": "anything", "can_override": false}, "chosenangle": {"name": "chosenangle", "group": "display variables", "definition": "anglechoices[angle]", "description": "", "templateType": "anything", "can_override": false}, "chosensct": {"name": "chosensct", "group": "display variables", "definition": "sctchoices[sct]", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "the answer", "definition": "deg_to_degmin(matrix2row[0])", "description": "", "templateType": "anything", "can_override": false}, "anglestringchoices": {"name": "anglestringchoices", "group": "display variables", "definition": "[aA,aB]", "description": "", "templateType": "anything", "can_override": false}, "anglestring": {"name": "anglestring", "group": "display variables", "definition": "anglestringchoices[angle]", "description": "", "templateType": "anything", "can_override": false}, "matrix2": {"name": "matrix2", "group": "Ungrouped variables", "definition": "[\n [degrees(arcsin(sidea/sidec)), sidea, sidec],\n [degrees(arcsin(sideb/sidec)), sideb, sidec],\n [degrees(arccos(sideb/sidec)), sideb, sidec],\n [degrees(arccos(sidea/sidec)), sidea, sidec],\n [degrees(arctan(sidea/sideb)), sidea, sideb],\n [degrees(arctan(sideb/sidea)), sideb, sidea]\n]", "description": "columns: sin A, sin B, cos A, cos B, tan A, tan B
\nrow: [angle numerator denominator]
", "templateType": "anything", "can_override": false}, "matrix2row": {"name": "matrix2row", "group": "Ungrouped variables", "definition": "matrix2[2*sct+angle]", "description": "", "templateType": "anything", "can_override": false}, "answerdeg": {"name": "answerdeg", "group": "the answer", "definition": "int(decimal(split(answer,\"\u00b0\")[0]))", "description": "", "templateType": "anything", "can_override": false}, "answermin": {"name": "answermin", "group": "the answer", "definition": "int(decimal(split(split(answer,\"\u00b0\")[1],\"'\")[0]))", "description": "", "templateType": "anything", "can_override": false}, "num": {"name": "num", "group": "display variables", "definition": "matrix2row[1]", "description": "the numerator
", "templateType": "anything", "can_override": false}, "den": {"name": "den", "group": "display variables", "definition": "matrix2row[2]", "description": "the denominator
", "templateType": "anything", "can_override": false}, "answerfull": {"name": "answerfull", "group": "the answer", "definition": "dms(matrix2row[0])", "description": "", "templateType": "anything", "can_override": false}, "triangle": {"name": "triangle", "group": "display variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["angleArad", "angleBrad", "matrix1", "matrix2", "matrix1row", "matrix2row"], "variable_groups": [{"name": "display variables", "variables": ["aA", "aB", "a", "b", "c", "sctchoices", "chosensct", "anglechoices", "chosenangle", "anglestringchoices", "anglestring", "num", "den", "triangle"]}, {"name": "worked solution variables", "variables": []}, {"name": "the answer", "variables": ["answer", "answerdeg", "answermin", "answerfull"]}, {"name": "random variables", "variables": ["sct", "angle", "angleA", "angleB", "sidea", "sideb", "sidec"]}], "functions": {"deg_to_degmin": {"parameters": [["deg", "number"]], "type": "string", "language": "javascript", "definition": "min=Math.round((deg-Math.trunc(deg))*60);\ndegstr=String(Math.trunc(deg))+\"\u00b0\"+String(min)+\"'\";\nreturn degstr;"}, "dms": {"parameters": [["deg", "number"]], "type": "string", "language": "javascript", "definition": "degrees = Math.trunc(deg)\nmin = (deg - Math.trunc(deg))*60;\nminutes = Math.round(min);\nseconds = Math.round((min - Math.trunc(min))*6000)/100;\ndegstr=String(degrees)+\"\u00b0\"+String(minutes)+\"'\"+String(seconds)+\"''\";\nreturn degstr;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Find the value of angle $\\var{chosenangle}$
\nRound your answer to the nearest minute.
\n$\\var{chosenangle} =$ [[0]]°[[1]]'
", "gaps": [{"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, "minValue": "answerdeg", "maxValue": "answerdeg", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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, "minValue": "answermin", "maxValue": "answermin", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "right angle trig - find the side", "extensions": [], "custom_part_types": [], "resources": [["question-resources/RATriangle1_b6o8mmj.svg", "/srv/numbas/media/question-resources/RATriangle1_b6o8mmj.svg"], ["question-resources/RATriangle2_V82JKE5.svg", "/srv/numbas/media/question-resources/RATriangle2_V82JKE5.svg"], ["question-resources/RATriangle3_cVqd6sf.svg", "/srv/numbas/media/question-resources/RATriangle3_cVqd6sf.svg"], ["question-resources/RATriangle4_03OZUzG.svg", "/srv/numbas/media/question-resources/RATriangle4_03OZUzG.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Students are shown a right angled triangle and asked to compute a side length using a trig identity.
\nThe triangle is a fixed image, but the angles and side lengths are randomly selected.
\nThe angle is given in degrees and minutes, and students are asked for the side length correct to 1 decimal place.
\nThere are 4 different triangle orientations that can display.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "\n\n
Note that this diagram is not drawn to scale.
", "advice": "To find the value for {chosenside} in this diagram, we need to use the {chosensct} ratio.
\n$\\var{chosensct}(\\var{anglestring}) = \\frac{\\var{chosennum}}{\\var{chosenden}} $
\n$\\var{chosensct}(\\var{anglestring})= \\frac{\\var{numval}}{\\var{denval}}$
\n$\\var{numval} = {\\var{denval}} \\times \\var{chosensct}(\\var{anglestring})$
\n$\\var{numval} = \\var{longanswer}$
\nwhich we round to 1 decimal place (to match the precision of the given side) to get
\n$\\var{numval} = \\var{preciseanswer}$
\n$\\var{denval} \\times \\var{chosensct}(\\var{anglestring}) = \\var{numval}$
\n$\\var{denval} = \\frac{\\var{numval}}{\\var{chosensct}(\\var{anglestring})}$
\n$\\var{denval} = \\var{longanswer}$
\nwhich we round to 1 decimal place (to match the precision of the given side) to get
\n$\\var{denval} = \\var{preciseanswer}$
\n", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"sct": {"name": "sct", "group": "randomly chosen variables", "definition": "random(0,1,2)", "description": "0 = sin
\n1 = cos
\n2 = tan
", "templateType": "anything", "can_override": false}, "angleA": {"name": "angleA", "group": "randomly chosen variables", "definition": "dec(random(15..40)+random(0..59)/60)", "description": "", "templateType": "anything", "can_override": false}, "angleB": {"name": "angleB", "group": "randomly chosen variables", "definition": "90-angleA", "description": "", "templateType": "anything", "can_override": false}, "sidec": {"name": "sidec", "group": "randomly chosen variables", "definition": "dec(random(10..500)/10)", "description": "", "templateType": "anything", "can_override": false}, "sideb": {"name": "sideb", "group": "randomly chosen variables", "definition": "dec(round(sidec*cos(angleArad)*10)/10)", "description": "", "templateType": "anything", "can_override": false}, "angleArad": {"name": "angleArad", "group": "Ungrouped variables", "definition": "angleA/180*pi", "description": "", "templateType": "anything", "can_override": false}, "angleBrad": {"name": "angleBrad", "group": "Ungrouped variables", "definition": "angleB/180*pi", "description": "", "templateType": "anything", "can_override": false}, "sidea": {"name": "sidea", "group": "randomly chosen variables", "definition": "dec((round(sidec*sin(angleArad)*10))/10)", "description": "", "templateType": "anything", "can_override": false}, "angle": {"name": "angle", "group": "randomly chosen variables", "definition": "random(0,1)", "description": "0 means angle A is given
\n1 means angle B is given
", "templateType": "anything", "can_override": false}, "matrixrow": {"name": "matrixrow", "group": "Ungrouped variables", "definition": "displaymatrix[angle][sct][ndvar]", "description": "", "templateType": "anything", "can_override": false}, "aA": {"name": "aA", "group": "display variables", "definition": "if(matrixrow[0]='','',deg_to_degmin(matrixrow[0]))", "description": "", "templateType": "anything", "can_override": false}, "aB": {"name": "aB", "group": "display variables", "definition": "if(matrixrow[1]='','',deg_to_degmin(matrixrow[1]))", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "display variables", "definition": "matrixrow[2]", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "display variables", "definition": "matrixrow[3]", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "display variables", "definition": "matrixrow[4]", "description": "", "templateType": "anything", "can_override": false}, "sctchoices": {"name": "sctchoices", "group": "display variables", "definition": "['sin','cos','tan']", "description": "", "templateType": "anything", "can_override": false}, "anglechoices": {"name": "anglechoices", "group": "display variables", "definition": "['A','B']", "description": "", "templateType": "anything", "can_override": false}, "chosenangle": {"name": "chosenangle", "group": "display variables", "definition": "anglechoices[angle]", "description": "", "templateType": "anything", "can_override": false}, "chosensct": {"name": "chosensct", "group": "display variables", "definition": "sctchoices[sct]", "description": "", "templateType": "anything", "can_override": false}, "sidechoices": {"name": "sidechoices", "group": "display variables", "definition": "[\n [\n [['a'],['c']],\n [['b'],['c']],\n [['a'],['b']]\n ],\n [\n [['b'],['c']],\n [['a'],['c']],\n [['b'],['a']]\n ]\n]", "description": "", "templateType": "anything", "can_override": false}, "chosenside": {"name": "chosenside", "group": "display variables", "definition": "sidechoices[angle][sct][ndvar][0]", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "the answer", "definition": "if(chosenside='a',sidea,if(chosenside='b',sideb,sidec))", "description": "", "templateType": "anything", "can_override": false}, "chosennum": {"name": "chosennum", "group": "display variables", "definition": "if(sct=1,'adjacent','opposite')", "description": "", "templateType": "anything", "can_override": false}, "chosenden": {"name": "chosenden", "group": "display variables", "definition": "if(sct=2,'adjacent','hypotenuse')", "description": "", "templateType": "anything", "can_override": false}, "numval": {"name": "numval", "group": "Ungrouped variables", "definition": "andmatrixrow[1]", "description": "", "templateType": "anything", "can_override": false}, "denval": {"name": "denval", "group": "Ungrouped variables", "definition": "andmatrixrow[2]", "description": "", "templateType": "anything", "can_override": false}, "anglevals": {"name": "anglevals", "group": "Ungrouped variables", "definition": "[radians(angleA),radians(angleB)]", "description": "", "templateType": "anything", "can_override": false}, "var_on_num": {"name": "var_on_num", "group": "worked solution variables", "definition": "(numval = 'a') or (numval='b') or (numval='c')", "description": "", "templateType": "anything", "can_override": false}, "ourangle": {"name": "ourangle", "group": "the answer", "definition": "anglevals[angle]", "description": "", "templateType": "anything", "can_override": false}, "preciseanswer": {"name": "preciseanswer", "group": "the answer", "definition": "precround(if(var_on_num,denval*if(sct=0,sin(ourangle),if(sct=1,cos(ourangle),tan(ourangle))),numval/if(sct=0,sin(ourangle),if(sct=1,cos(ourangle),tan(ourangle)))),1)", "description": "", "templateType": "anything", "can_override": false}, "anglestringchoices": {"name": "anglestringchoices", "group": "display variables", "definition": "[aA,aB]", "description": "", "templateType": "anything", "can_override": false}, "anglestring": {"name": "anglestring", "group": "display variables", "definition": "anglestringchoices[angle]", "description": "", "templateType": "anything", "can_override": false}, "longanswer": {"name": "longanswer", "group": "the answer", "definition": "precround(if(var_on_num,denval*if(sct=0,sin(ourangle),if(sct=1,cos(ourangle),tan(ourangle))),numval/if(sct=0,sin(ourangle),if(sct=1,cos(ourangle),tan(ourangle)))),3)", "description": "", "templateType": "anything", "can_override": false}, "displaymatrix": {"name": "displaymatrix", "group": "display variables", "definition": "[\n [\n [[angleA,'','a','',sidec],[angleA,'',sidea,'','c']],\n [[angleA,'','','b',sidec],[angleA,'','',sideb,'c']],\n [[angleA,'','a',sideb,''],[angleA,'',sidea,'b','']]\n ],\n [\n [['', AngleB, '', 'b', sidec],['', AngleB, '', sideb, 'c']],\n [['', AngleB, 'a', '', sidec],['', AngleB, sidea, '', 'c']],\n [['', AngleB, sidea, 'b', ''],['', AngleB, 'a', sideb, '']]\n ]\n]", "description": "This 3d matrix lists the variables as they are to be displayed. The first dimension is the choice of angle, the second dimension is the trig function to be used, and the third dimension is whether the numerator or the denominator is the variable to be determined.
\n[A B][sin cos tan][num den]
", "templateType": "anything", "can_override": false}, "andmatrix": {"name": "andmatrix", "group": "Ungrouped variables", "definition": "[\n [\n [[angleA,'a',sidec],[angleA,sidea,'c']],\n [[angleA,'b',sidec],[angleA,sideb,'c']],\n [[angleA,'a',sideb],[angleA,sidea,'b']]\n ],\n [\n [[AngleB, 'b', sidec],[AngleB, sideb, 'c']],\n [[AngleB, 'a', sidec],[AngleB, sidea, 'c']],\n [[AngleB, 'b', sidea],[AngleB, sideb, 'a']]\n ]\n]", "description": "angle numerator denominator for each combination
", "templateType": "anything", "can_override": false}, "ndvar": {"name": "ndvar", "group": "randomly chosen variables", "definition": "random(0,1)", "description": "which variable to determine the denominator?
\n0 = numerator
\n1 = denominator
", "templateType": "anything", "can_override": false}, "andmatrixrow": {"name": "andmatrixrow", "group": "Ungrouped variables", "definition": "andmatrix[angle][sct][ndvar]", "description": "", "templateType": "anything", "can_override": false}, "triangle": {"name": "triangle", "group": "randomly chosen variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["angleArad", "angleBrad", "matrixrow", "numval", "denval", "anglevals", "andmatrix", "andmatrixrow"], "variable_groups": [{"name": "display variables", "variables": ["displaymatrix", "aA", "aB", "a", "b", "c", "sctchoices", "chosensct", "anglechoices", "chosenangle", "sidechoices", "chosenside", "chosennum", "chosenden", "anglestringchoices", "anglestring"]}, {"name": "worked solution variables", "variables": ["var_on_num"]}, {"name": "the answer", "variables": ["answer", "anglevals", "ourangle", "preciseanswer", "longanswer"]}, {"name": "randomly chosen variables", "variables": ["sct", "angleA", "angleB", "sidea", "sideb", "sidec", "angle", "ndvar", "triangle"]}], "functions": {"deg_to_degmin": {"parameters": [["deg", "number"]], "type": "string", "language": "javascript", "definition": "min=Math.round((deg-Math.trunc(deg))*60);\ndegstr=String(Math.trunc(deg))+\"\u00b0\"+String(min)+\"'\";\nreturn degstr;"}}, "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": "Find the value of {chosenside} in the diagram.
\nGive your answer to 1 decimal place.
", "minValue": "preciseanswer", "maxValue": "preciseanswer", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}, {"name": "Non right-angle", "pickingStrategy": "random-subset", "pickQuestions": "2", "questionNames": ["", "", "", ""], "questions": [{"name": "cos rule - find a side", "extensions": [], "custom_part_types": [], "resources": [["question-resources/AcuteTriangle_tSonQMW.svg", "/srv/numbas/media/question-resources/AcuteTriangle_tSonQMW.svg"], ["question-resources/ObtuseTriangle_Fe8ESh4.svg", "/srv/numbas/media/question-resources/ObtuseTriangle_Fe8ESh4.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Student is given a triangle with the value of 2 sides and 1 or 2 angles and asked to find the value of the third side using the cosine rule. Triangle can be acute or obtuse.
\nSide and angle lengths are randomised. Units are randomised.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Use the cosine rule to find the value of {dspchosenside}. Give your answer rounded to the 1 decimal place.
\n\n
not to scale
\n", "advice": "To find the value of {dspchosenside} we need to use the cosine rule.
\nWe need to use the angle opposite {dspchosenside} but this is not given so we need to work it out:
\nangle = 180° - {angle_dsp_vals[helpingvar]} - {angle_dsp_vals[othervar]} = {angle_dsp_vals[findvar]}
\n$\\var{dspchosenside}^2 = \\var{side_dsp_vals[helpingvar]}^2 + \\var{side_dsp_vals[othervar]}^2 - 2 \\times \\var{side_dsp_vals[helpingvar]} \\times \\var{side_dsp_vals[othervar]} \\times \\cos(\\var{angle_dsp_vals[findvar]})$
\nTake the square root of both sides:
\n$\\var{dspchosenside} = \\sqrt{\\var{side_dsp_vals[helpingvar]}^2 + \\var{side_dsp_vals[othervar]}^2 - 2 \\times \\var{side_dsp_vals[helpingvar]} \\times \\var{side_dsp_vals[othervar]} \\times \\cos(\\var{angle_dsp_vals[findvar]})}=\\var{side_dsp_vals[findvar]}$ {units}
\n", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"obtuse": {"name": "obtuse", "group": "build the triangle", "definition": "if(angle_C_val>pi/2,1,0)", "description": "", "templateType": "anything", "can_override": false}, "findvar": {"name": "findvar", "group": "set up the problem", "definition": "random(0,1,2)", "description": "0 = A, 1 = B, 2 = C
", "templateType": "anything", "can_override": false}, "side_b_val": {"name": "side_b_val", "group": "build the triangle", "definition": "decimal(random(5..200)/10)", "description": "", "templateType": "anything", "can_override": false}, "side_c_val": {"name": "side_c_val", "group": "build the triangle", "definition": "decimal(random(side_b_val*10..min(250,2*side_b_val*10))/10)", "description": "", "templateType": "anything", "can_override": false}, "angle_A_deg": {"name": "angle_A_deg", "group": "build the triangle", "definition": "random(10..50)", "description": "", "templateType": "anything", "can_override": false}, "angle_A_min": {"name": "angle_A_min", "group": "build the triangle", "definition": "random(0..59)", "description": "", "templateType": "anything", "can_override": false}, "angle_A_val": {"name": "angle_A_val", "group": "build the triangle", "definition": "radians(angle_A_deg + angle_A_min/60)", "description": "", "templateType": "anything", "can_override": false}, "side_a_val": {"name": "side_a_val", "group": "build the triangle", "definition": "precround(cosrule_side(side_b_val,side_c_val,angle_A_val),1)", "description": "", "templateType": "anything", "can_override": false}, "angle_B_val": {"name": "angle_B_val", "group": "build the triangle", "definition": "round_to_min(cosrule_angle(side_a_val,side_c_val,side_b_val))", "description": "", "templateType": "anything", "can_override": false}, "angle_C_val": {"name": "angle_C_val", "group": "build the triangle", "definition": "round_to_min(pi-angle_A_val-angle_B_val)", "description": "", "templateType": "anything", "can_override": false}, "aA": {"name": "aA", "group": "display vars", "definition": "if (findvar=0 and dsp1angle=1,angle_dsp_vals[0],if(findvar<>0 and dsp1angle=0,angle_dsp_vals[0],''))", "description": "", "templateType": "anything", "can_override": false}, "aB": {"name": "aB", "group": "display vars", "definition": "if (findvar=1 and dsp1angle=1,angle_dsp_vals[1],if(findvar<>1 and dsp1angle=0,angle_dsp_vals[1],''))", "description": "", "templateType": "anything", "can_override": false}, "aC": {"name": "aC", "group": "display vars", "definition": "if (findvar=2 and dsp1angle=1,angle_dsp_vals[2],if(findvar<>2 and dsp1angle=0,angle_dsp_vals[2],''))", "description": "", "templateType": "anything", "can_override": false}, "sa": {"name": "sa", "group": "display vars", "definition": "if(findvar=0,'a',side_dsp_vals[0])", "description": "", "templateType": "anything", "can_override": false}, "sb": {"name": "sb", "group": "display vars", "definition": "if(findvar=1,'b',side_dsp_vals[1])", "description": "", "templateType": "anything", "can_override": false}, "sc": {"name": "sc", "group": "display vars", "definition": "if(findvar=2,'c',side_dsp_vals[2])", "description": "", "templateType": "anything", "can_override": false}, "helpingvar": {"name": "helpingvar", "group": "set up the problem", "definition": "if(findvar=0,random(1,2),if(findvar=1,random(0,2),random(0,1)))", "description": "0=a, 1=b, 2=c
", "templateType": "anything", "can_override": false}, "side_vals": {"name": "side_vals", "group": "set up the problem", "definition": "[side_a_val,side_b_val,side_c_val]", "description": "", "templateType": "anything", "can_override": false}, "angle_dsp_names": {"name": "angle_dsp_names", "group": "set up the problem", "definition": "['A','B','C']", "description": "", "templateType": "anything", "can_override": false}, "side_dsp_vals": {"name": "side_dsp_vals", "group": "set up the problem", "definition": "[precround(side_a_val,1),precround(side_b_val,1),precround(side_c_val,1)]", "description": "", "templateType": "anything", "can_override": false}, "angle_dsp_vals": {"name": "angle_dsp_vals", "group": "set up the problem", "definition": "[deg_to_degmin(degrees(angle_A_val)),deg_to_degmin(degrees(angle_B_val)),deg_to_degmin(degrees(angle_C_val))]", "description": "", "templateType": "anything", "can_override": false}, "unitchoices": {"name": "unitchoices", "group": "display vars", "definition": "['mm','cm','m','km']", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "display vars", "definition": "random(unitchoices)", "description": "", "templateType": "anything", "can_override": false}, "othervar": {"name": "othervar", "group": "set up the problem", "definition": "3-findvar-helpingvar", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "set up the problem", "definition": "precround(cosrule_side(side_vals[helpingvar],side_vals[othervar],angle_vals[findvar]),1)", "description": "", "templateType": "anything", "can_override": false}, "dspchosenside": {"name": "dspchosenside", "group": "set up the problem", "definition": "side_dsp_names[findvar]", "description": "", "templateType": "anything", "can_override": false}, "dsp1angle": {"name": "dsp1angle", "group": "display vars", "definition": "random(0,1)", "description": "0 = no: the other 2 angles are given
\n1 = yes: the opposite angle is given
", "templateType": "anything", "can_override": false}, "test": {"name": "test", "group": "build the triangle", "definition": "round_to_min(cosrule_angle(side_a_val,side_c_val,side_b_val))", "description": "", "templateType": "anything", "can_override": false}, "side_dsp_names": {"name": "side_dsp_names", "group": "set up the problem", "definition": "['a','b','c']", "description": "", "templateType": "anything", "can_override": false}, "angle_vals": {"name": "angle_vals", "group": "set up the problem", "definition": "[angle_A_val,angle_B_val,angle_C_val]", "description": "", "templateType": "anything", "can_override": false}, "dspchosenangle": {"name": "dspchosenangle", "group": "Ungrouped variables", "definition": "", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["dspchosenangle"], "variable_groups": [{"name": "build the triangle", "variables": ["side_a_val", "side_b_val", "side_c_val", "angle_A_deg", "angle_A_min", "angle_A_val", "angle_B_val", "angle_C_val", "obtuse", "test"]}, {"name": "display vars", "variables": ["aA", "aB", "aC", "sa", "sb", "sc", "unitchoices", "units", "dsp1angle"]}, {"name": "set up the problem", "variables": ["findvar", "helpingvar", "othervar", "answer", "side_vals", "side_dsp_vals", "side_dsp_names", "angle_vals", "angle_dsp_vals", "angle_dsp_names", "dspchosenside"]}], "functions": {"deg_to_degmin": {"parameters": [["deg", "number"]], "type": "string", "language": "javascript", "definition": "min=Math.round((deg-Math.trunc(deg))*60);\ndegstr=String(Math.trunc(deg))+\"\u00b0\"+String(min)+\"'\";\nreturn degstr;"}, "dms": {"parameters": [["deg", "number"]], "type": "string", "language": "javascript", "definition": "degrees = Math.trunc(deg);\nmin = (deg - Math.trunc(deg))*60;\nminutes = Math.round(min);\nseconds = Math.round((min - Math.trunc(min))*6000)/100;\ndegstr=String(degrees)+\"\u00b0\"+String(minutes)+\"'\"+String(seconds)+\"''\";\nreturn degstr;"}, "cosrule_side": {"parameters": [["a", "number"], ["b", "number"], ["C", "number"]], "type": "number", "language": "javascript", "definition": "tmp=Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(C);\ntmp2 = Math.sqrt(tmp);\nreturn tmp2;"}, "sinerule_angle": {"parameters": [["a", "number"], ["b", "number"], ["angB", "number"]], "type": "number", "language": "javascript", "definition": "return Math.asin(a*Math.sin(angB)/b)"}, "cosrule_angle": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "type": "number", "language": "javascript", "definition": "num = Math.pow(a,2) + Math.pow(b,2) - Math.pow(c,2);\nden = 2 * a * b\nreturn Math.acos(num/den);"}, "round_to_min": {"parameters": [["angle", "number"]], "type": "number", "language": "javascript", "definition": "deg = angle * 180 / Math.PI;\ndegrees = Math.trunc(deg);\nmin = (deg - Math.trunc(deg))*60;\nminutes = Math.round(min);\nrounded = degrees + minutes/60;\nreturn rounded * Math.PI / 180;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "{dspchosenangle} = [[0]] {units}
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "length", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "answer", "maxValue": "answer", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "cos rule - find an angle", "extensions": [], "custom_part_types": [], "resources": [["question-resources/AcuteTriangle_tSonQMW.svg", "/srv/numbas/media/question-resources/AcuteTriangle_tSonQMW.svg"], ["question-resources/ObtuseTriangle_Fe8ESh4.svg", "/srv/numbas/media/question-resources/ObtuseTriangle_Fe8ESh4.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Student is given a triangle with the value of 3 sides and asked to find the value of an angle. Triangle can be acute or obtuse.
\nSide and angle lengths are randomised. Units are randomised.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Use the cosine rule to find the value of angle {dspchosenangle}. Angle {dspchosenangle} is obtuse.
\nGive your answer rounded to the nearest minute.
\n\n
not to scale
\n", "advice": "To find the value of {dspchosenangle} we need to use the cosine rule.
\n$\\cos(\\var{dspchosenangle}) = \\frac{\\var{side_dsp_vals[helpingvar]}^2 + \\var{side_dsp_vals[othervar]}^2 - \\var{side_dsp_vals[findvar]}^2}{2 \\times \\var{side_dsp_vals[helpingvar]} \\times \\var{side_dsp_vals[othervar]}}$
\nTake the inverse cos of both sides:
\n$\\var{dspchosenangle} = \\cos^{-1}(\\frac{\\var{side_dsp_vals[helpingvar]}^2 +\\var{side_dsp_vals[othervar]}^2 -\\var{side_dsp_vals[findvar]}^2}{2 \\times \\var{side_dsp_vals[helpingvar]} \\times \\var{side_dsp_vals[othervar]}}) = \\var{answer_deg}$° $\\var{answer_min}$'
\n", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"obtuse": {"name": "obtuse", "group": "build the triangle", "definition": "if(angle_C_val>pi/2,1,0)", "description": "", "templateType": "anything", "can_override": false}, "findvar": {"name": "findvar", "group": "set up the problem", "definition": "random(0,1,2)", "description": "0 = A, 1 = B, 2 = C
", "templateType": "anything", "can_override": false}, "side_b_val": {"name": "side_b_val", "group": "build the triangle", "definition": "decimal(random(5..200)/10)", "description": "", "templateType": "anything", "can_override": false}, "side_c_val": {"name": "side_c_val", "group": "build the triangle", "definition": "decimal(random(side_b_val*10..min(250,2*side_b_val*10))/10)", "description": "", "templateType": "anything", "can_override": false}, "angle_A_deg": {"name": "angle_A_deg", "group": "build the triangle", "definition": "random(10..50)", "description": "", "templateType": "anything", "can_override": false}, "angle_A_min": {"name": "angle_A_min", "group": "build the triangle", "definition": "random(0..59)", "description": "", "templateType": "anything", "can_override": false}, "angle_A_val": {"name": "angle_A_val", "group": "build the triangle", "definition": "radians(angle_A_deg + angle_A_min/60)", "description": "", "templateType": "anything", "can_override": false}, "side_a_val": {"name": "side_a_val", "group": "build the triangle", "definition": "precround(cosrule_side(side_b_val,side_c_val,angle_A_val),1)", "description": "", "templateType": "anything", "can_override": false}, "angle_B_val": {"name": "angle_B_val", "group": "build the triangle", "definition": "round_to_min(cosrule_angle(side_a_val,side_c_val,side_b_val))", "description": "", "templateType": "anything", "can_override": false}, "angle_C_val": {"name": "angle_C_val", "group": "build the triangle", "definition": "round_to_min(pi-angle_A_val-angle_B_val)", "description": "", "templateType": "anything", "can_override": false}, "aA": {"name": "aA", "group": "display vars", "definition": "if (findvar=0,'A','')", "description": "", "templateType": "anything", "can_override": false}, "aB": {"name": "aB", "group": "display vars", "definition": "if (findvar=1,'B','')", "description": "", "templateType": "anything", "can_override": false}, "aC": {"name": "aC", "group": "display vars", "definition": "if(findvar=2,'C','')", "description": "", "templateType": "anything", "can_override": false}, "sa": {"name": "sa", "group": "display vars", "definition": "side_dsp_vals[0]", "description": "", "templateType": "anything", "can_override": false}, "sb": {"name": "sb", "group": "display vars", "definition": "side_dsp_vals[1]", "description": "", "templateType": "anything", "can_override": false}, "sc": {"name": "sc", "group": "display vars", "definition": "side_dsp_vals[2]", "description": "", "templateType": "anything", "can_override": false}, "helpingvar": {"name": "helpingvar", "group": "set up the problem", "definition": "if(findvar=0,random(1,2),if(findvar=1,random(0,2),random(0,1)))", "description": "0=a, 1=b, 2=c
", "templateType": "anything", "can_override": false}, "side_vals": {"name": "side_vals", "group": "set up the problem", "definition": "[side_a_val,side_b_val,side_c_val]", "description": "", "templateType": "anything", "can_override": false}, "angle_dsp_names": {"name": "angle_dsp_names", "group": "set up the problem", "definition": "['A','B','C']", "description": "", "templateType": "anything", "can_override": false}, "side_dsp_vals": {"name": "side_dsp_vals", "group": "set up the problem", "definition": "[precround(side_a_val,1),precround(side_b_val,1),precround(side_c_val,1)]", "description": "", "templateType": "anything", "can_override": false}, "angle_dsp_vals": {"name": "angle_dsp_vals", "group": "set up the problem", "definition": "[deg_to_degmin(degrees(angle_A_val)),deg_to_degmin(degrees(angle_B_val)),deg_to_degmin(degrees(angle_C_val))]", "description": "", "templateType": "anything", "can_override": false}, "unitchoices": {"name": "unitchoices", "group": "display vars", "definition": "['mm','cm','m','km']", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "display vars", "definition": "random(unitchoices)", "description": "", "templateType": "anything", "can_override": false}, "othervar": {"name": "othervar", "group": "set up the problem", "definition": "3-findvar-helpingvar", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "set up the problem", "definition": "cosrule_angle(side_vals[helpingvar],side_vals[othervar],side_vals[findvar])", "description": "", "templateType": "anything", "can_override": false}, "dspchosenangle": {"name": "dspchosenangle", "group": "set up the problem", "definition": "angle_dsp_names[findvar]", "description": "", "templateType": "anything", "can_override": false}, "dsp3rdside": {"name": "dsp3rdside", "group": "display vars", "definition": "random(0,1)", "description": "0 = no
\n1 = yes
", "templateType": "anything", "can_override": false}, "answer_deg": {"name": "answer_deg", "group": "set up the problem", "definition": "decimal(split(deg_to_degmin(degrees(answer)),'\u00b0')[0])", "description": "", "templateType": "anything", "can_override": false}, "test": {"name": "test", "group": "build the triangle", "definition": "round_to_min(cosrule_angle(side_a_val,side_c_val,side_b_val))", "description": "", "templateType": "anything", "can_override": false}, "side_dsp_names": {"name": "side_dsp_names", "group": "set up the problem", "definition": "['a','b','c']", "description": "", "templateType": "anything", "can_override": false}, "angleA": {"name": "angleA", "group": "display vars", "definition": "deg_to_degmin(degrees(angle_A_val))", "description": "", "templateType": "anything", "can_override": false}, "answer_min": {"name": "answer_min", "group": "set up the problem", "definition": "decimal(split(split(deg_to_degmin(degrees(answer)),'\u00b0')[1],\"'\")[0])", "description": "", "templateType": "anything", "can_override": false}, "angleB": {"name": "angleB", "group": "display vars", "definition": "deg_to_degmin(degrees(angle_B_val))", "description": "", "templateType": "anything", "can_override": false}, "angleC": {"name": "angleC", "group": "display vars", "definition": "deg_to_degmin(degrees(angle_C_val))", "description": "", "templateType": "anything", "can_override": false}, "angle_vals": {"name": "angle_vals", "group": "set up the problem", "definition": "[angle_A_val,angle_B_val,angle_C_val]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "build the triangle", "variables": ["side_a_val", "side_b_val", "side_c_val", "angle_A_deg", "angle_A_min", "angle_A_val", "angle_B_val", "angle_C_val", "obtuse", "test"]}, {"name": "display vars", "variables": ["aA", "aB", "aC", "sa", "sb", "sc", "unitchoices", "units", "dsp3rdside", "angleA", "angleB", "angleC"]}, {"name": "set up the problem", "variables": ["findvar", "helpingvar", "othervar", "answer", "answer_deg", "answer_min", "side_vals", "side_dsp_vals", "side_dsp_names", "angle_dsp_vals", "angle_dsp_names", "dspchosenangle", "angle_vals"]}], "functions": {"deg_to_degmin": {"parameters": [["deg", "number"]], "type": "string", "language": "javascript", "definition": "min=Math.round((deg-Math.trunc(deg))*60);\ndegstr=String(Math.trunc(deg))+\"\u00b0\"+String(min)+\"'\";\nreturn degstr;"}, "dms": {"parameters": [["deg", "number"]], "type": "string", "language": "javascript", "definition": "degrees = Math.trunc(deg);\nmin = (deg - Math.trunc(deg))*60;\nminutes = Math.round(min);\nseconds = Math.round((min - Math.trunc(min))*6000)/100;\ndegstr=String(degrees)+\"\u00b0\"+String(minutes)+\"'\"+String(seconds)+\"''\";\nreturn degstr;"}, "cosrule_side": {"parameters": [["a", "number"], ["b", "number"], ["C", "number"]], "type": "number", "language": "javascript", "definition": "tmp=Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(C);\ntmp2 = Math.sqrt(tmp);\nreturn tmp2;"}, "sinerule_angle": {"parameters": [["a", "number"], ["b", "number"], ["angB", "number"]], "type": "number", "language": "javascript", "definition": "return Math.asin(a*Math.sin(angB)/b)"}, "cosrule_angle": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "type": "number", "language": "javascript", "definition": "num = Math.pow(a,2) + Math.pow(b,2) - Math.pow(c,2);\nden = 2 * a * b\nreturn Math.acos(num/den);"}, "round_to_min": {"parameters": [["angle", "number"]], "type": "number", "language": "javascript", "definition": "deg = angle * 180 / Math.PI;\ndegrees = Math.trunc(deg);\nmin = (deg - Math.trunc(deg))*60;\nminutes = Math.round(min);\nrounded = degrees + minutes/60;\nreturn rounded * Math.PI / 180;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "{dspchosenangle} = [[0]] °[[1]]'
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "degrees", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "answer_deg", "maxValue": "answer_deg", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "minutes", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "answer_min", "maxValue": "answer_min", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "sine rule - find a side", "extensions": [], "custom_part_types": [], "resources": [["question-resources/AcuteTriangle_tSonQMW.svg", "/srv/numbas/media/question-resources/AcuteTriangle_tSonQMW.svg"], ["question-resources/ObtuseTriangle_Fe8ESh4.svg", "/srv/numbas/media/question-resources/ObtuseTriangle_Fe8ESh4.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Student is given a triangle with the value of 1 side and 2 or 3 angles and asked to find the value of another side. Triangle can be acute or obtuse.
\nSide and angle lengths are randomised. Units are randomised.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Find the value of side {dspchosenside}. Round your answer to 1 decimal place.
\n\n
not to scale
\n", "advice": "To find the value of {dspchosenside} we need to use the sine rule.
\nThis means that we need to find the value of the angle opposite side {dspchosenside} and one other side and opposite angle.
\nSince the angle opposite {dspchosenside} is not given, we need to work it out, using the fact that the angles in the triangle sum to 180º.
\nangle = 180º - {angle_dsp_vals[helpingvar]} - {angle_dsp_vals[othervar]} = {angle_dsp_vals[findvar]}
\n$\\frac{\\var{dspchosenside}}{\\sin(\\var{angle_dsp_vals[findvar]})}=\\frac{\\var{side_dsp_vals[helpingvar]}}{\\sin(\\var{angle_dsp_vals[helpingvar]})}$
\nNext we multiply both sides by ${\\sin(\\var{angle_dsp_vals[findvar]})}$
\n$\\var{dspchosenside}=\\frac{\\sin(\\var{angle_dsp_vals[findvar]})\\times \\var{side_dsp_vals[helpingvar]}}{\\sin(\\var{angle_dsp_vals[helpingvar]})} = \\var{answer}$ {units}
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"obtuse": {"name": "obtuse", "group": "build the triangle", "definition": "if(angle_C_val>pi/2,1,0)", "description": "", "templateType": "anything", "can_override": false}, "findvar": {"name": "findvar", "group": "set up the problem", "definition": "random(0,1,2)", "description": "0 = A, 1 = B, 2 = C
", "templateType": "anything", "can_override": false}, "side_b_val": {"name": "side_b_val", "group": "build the triangle", "definition": "decimal(random(5..200)/10)", "description": "", "templateType": "anything", "can_override": false}, "side_c_val": {"name": "side_c_val", "group": "build the triangle", "definition": "decimal(random(side_b_val*10..min(250,2*side_b_val*10))/10)", "description": "", "templateType": "anything", "can_override": false}, "angle_A_deg": {"name": "angle_A_deg", "group": "build the triangle", "definition": "random(10..50)", "description": "", "templateType": "anything", "can_override": false}, "angle_A_min": {"name": "angle_A_min", "group": "build the triangle", "definition": "random(0..59)", "description": "", "templateType": "anything", "can_override": false}, "angle_A_val": {"name": "angle_A_val", "group": "build the triangle", "definition": "radians(angle_A_deg + angle_A_min/60)", "description": "", "templateType": "anything", "can_override": false}, "side_a_val": {"name": "side_a_val", "group": "build the triangle", "definition": "precround(cosrule_side(side_b_val,side_c_val,angle_A_val),1)", "description": "", "templateType": "anything", "can_override": false}, "angle_B_val": {"name": "angle_B_val", "group": "build the triangle", "definition": "cosrule_angle(side_a_val,side_c_val,side_b_val)", "description": "", "templateType": "anything", "can_override": false}, "angle_C_val": {"name": "angle_C_val", "group": "build the triangle", "definition": "pi-angle_A_val-angle_B_val", "description": "", "templateType": "anything", "can_override": false}, "aA": {"name": "aA", "group": "display vars", "definition": "if ((findvar=0 and dsp3rdangle <> 0) or (helpingvar=0) or (findvar<>0 and helpingvar <>0 and dsp3rdangle<>1), angle_dsp_vals[0],'')", "description": "", "templateType": "anything", "can_override": false}, "aB": {"name": "aB", "group": "display vars", "definition": "if ((findvar=1 and dsp3rdangle <> 0) or (helpingvar=1) or (findvar<>1 and helpingvar <>1 and dsp3rdangle<>1), angle_dsp_vals[1],'')", "description": "", "templateType": "anything", "can_override": false}, "aC": {"name": "aC", "group": "display vars", "definition": "if ((findvar=2 and dsp3rdangle <> 0) or (helpingvar=2) or (findvar<>2 and helpingvar <>2 and dsp3rdangle<>1), angle_dsp_vals[2],'')", "description": "", "templateType": "anything", "can_override": false}, "sa": {"name": "sa", "group": "display vars", "definition": "if(findvar=0,'a',if(helpingvar=0,string(side_dsp_vals[0])+' ' +units,''))", "description": "", "templateType": "anything", "can_override": false}, "sb": {"name": "sb", "group": "display vars", "definition": "if(findvar=1,'b',if(helpingvar=1,string(side_dsp_vals[1])+' ' +units,''))", "description": "", "templateType": "anything", "can_override": false}, "sc": {"name": "sc", "group": "display vars", "definition": "if(findvar=2,'c',if(helpingvar=2,string(side_dsp_vals[2])+' ' +units,''))", "description": "", "templateType": "anything", "can_override": false}, "helpingvar": {"name": "helpingvar", "group": "set up the problem", "definition": "if(findvar=0,random(1,2),if(findvar=1,random(0,2),random(0,1)))", "description": "0=a, 1=b, 2=c
", "templateType": "anything", "can_override": false}, "side_vals": {"name": "side_vals", "group": "set up the problem", "definition": "[side_a_val,side_b_val,side_c_val]", "description": "", "templateType": "anything", "can_override": false}, "angle_vals": {"name": "angle_vals", "group": "set up the problem", "definition": "[angle_A_val,angle_B_val,angle_C_val]", "description": "", "templateType": "anything", "can_override": false}, "side_dsp_names": {"name": "side_dsp_names", "group": "set up the problem", "definition": "['a','b','c']", "description": "", "templateType": "anything", "can_override": false}, "angle_dsp_names": {"name": "angle_dsp_names", "group": "set up the problem", "definition": "['A','B','C']", "description": "", "templateType": "anything", "can_override": false}, "side_dsp_vals": {"name": "side_dsp_vals", "group": "set up the problem", "definition": "[precround(side_a_val,1),precround(side_b_val,1),precround(side_c_val,1)]", "description": "", "templateType": "anything", "can_override": false}, "angle_dsp_vals": {"name": "angle_dsp_vals", "group": "set up the problem", "definition": "[deg_to_degmin(degrees(angle_A_val)),deg_to_degmin(degrees(angle_B_val)),deg_to_degmin(degrees(angle_C_val))]", "description": "", "templateType": "anything", "can_override": false}, "unitchoices": {"name": "unitchoices", "group": "display vars", "definition": "['mm','cm','m','km']", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "display vars", "definition": "random(unitchoices)", "description": "", "templateType": "anything", "can_override": false}, "dsp3rdangle": {"name": "dsp3rdangle", "group": "display vars", "definition": "random(0,1,2)", "description": "0 = display 2nd angle
\n1 = display 3rd angle
\n2 = display both
", "templateType": "anything", "can_override": false}, "dspchosenside": {"name": "dspchosenside", "group": "set up the problem", "definition": "side_dsp_names[findvar]", "description": "", "templateType": "anything", "can_override": false}, "othervar": {"name": "othervar", "group": "set up the problem", "definition": "3-findvar-helpingvar", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "set up the problem", "definition": "precround(sin(angle_vals[findvar])*side_vals[helpingvar]/sin(angle_vals[helpingvar]),1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "build the triangle", "variables": ["side_a_val", "side_b_val", "side_c_val", "angle_A_deg", "angle_A_min", "angle_A_val", "angle_B_val", "angle_C_val", "obtuse"]}, {"name": "display vars", "variables": ["aA", "aB", "aC", "sa", "sb", "sc", "unitchoices", "units", "dsp3rdangle"]}, {"name": "set up the problem", "variables": ["findvar", "helpingvar", "othervar", "side_vals", "side_dsp_vals", "side_dsp_names", "angle_vals", "angle_dsp_vals", "angle_dsp_names", "dspchosenside", "answer"]}], "functions": {"deg_to_degmin": {"parameters": [["deg", "number"]], "type": "string", "language": "javascript", "definition": "min=Math.round((deg-Math.trunc(deg))*60);\ndegstr=String(Math.trunc(deg))+\"\u00b0\"+String(min)+\"'\";\nreturn degstr;"}, "dms": {"parameters": [["deg", "number"]], "type": "string", "language": "javascript", "definition": "degrees = Math.trunc(deg);\nmin = (deg - Math.trunc(deg))*60;\nminutes = Math.round(min);\nseconds = Math.round((min - Math.trunc(min))*6000)/100;\ndegstr=String(degrees)+\"\u00b0\"+String(minutes)+\"'\"+String(seconds)+\"''\";\nreturn degstr;"}, "cosrule_side": {"parameters": [["a", "number"], ["b", "number"], ["C", "number"]], "type": "number", "language": "javascript", "definition": "tmp=Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(C);\ntmp2 = Math.sqrt(tmp);\nreturn tmp2;"}, "sinerule_angle": {"parameters": [["a", "number"], ["b", "number"], ["angB", "number"]], "type": "number", "language": "javascript", "definition": "return Math.asin(a*Math.sin(angB)/b)"}, "cosrule_angle": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "type": "number", "language": "javascript", "definition": "num = Math.pow(a,2) + Math.pow(b,2) - Math.pow(c,2);\nden = 2 * a * b\nreturn Math.acos(num/den);"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "{dspchosenside} = [[0]] {units}
", "gaps": [{"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, "minValue": "answer", "maxValue": "answer", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "sine rule - find an angle", "extensions": [], "custom_part_types": [], "resources": [["question-resources/AcuteTriangle_tSonQMW.svg", "/srv/numbas/media/question-resources/AcuteTriangle_tSonQMW.svg"], ["question-resources/ObtuseTriangle_Fe8ESh4.svg", "/srv/numbas/media/question-resources/ObtuseTriangle_Fe8ESh4.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Student is given a triangle with 2 or 3 side lengths given and asked to use the sine rule to find the value of an angle. Triangle can be acute or obtuse.
\nSide and angle lengths are randomised. Units are randomised.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Use the sine rule to find the value of angle {dspchosenangle}. Angle {dspchosenangle} is obtuse.
\nGive your answer rounded to the nearest minute.
\n\n
not to scale
", "advice": "To find the value of {dspchosenangle} we need to use the sine rule.
\nThis means that we need to find the value of the side opposite angle{dspchosenangle} and one other side and opposite angle.
\n$\\frac{\\var{side_dsp_vals[findvar]}}{\\sin(\\var{dspchosenangle})}=\\frac{\\var{side_dsp_vals[helpingvar]}}{\\sin(\\var{angle_dsp_vals[helpingvar]})}$
\nNext we multiply both sides by ${\\sin(\\var{dspchosenangle})}$:
\n$\\var{side_dsp_vals[findvar]}=\\frac{\\sin(\\var{dspchosenangle})\\times \\var{side_dsp_vals[helpingvar]}}{\\sin(\\var{angle_dsp_vals[helpingvar]})}$
\nMultiply both sides by $\\sin(\\var{angle_dsp_vals[helpingvar]})$:
\n$\\var{side_dsp_vals[findvar]}\\times \\sin(\\var{angle_dsp_vals[helpingvar]}) =\\sin(\\var{dspchosenangle})\\times \\var{side_dsp_vals[helpingvar]}$
\nDivide both sides by $\\var{side_dsp_vals[helpingvar]}$:
\n$\\frac{\\var{side_dsp_vals[findvar]}\\times\\sin(\\var{angle_dsp_vals[helpingvar]})}{\\var{side_dsp_vals[helpingvar]}} =\\sin(\\var{dspchosenangle})$
\nSwap the sides around and take the inverse sin of both sides:
\n$\\sin(\\var{dspchosenangle})=\\frac{\\var{side_dsp_vals[findvar]}\\times\\sin(\\var{angle_dsp_vals[helpingvar]})}{\\var{side_dsp_vals[helpingvar]}}$
\n$ \\var{dspchosenangle} = sin^{-1}(\\frac{\\var{side_dsp_vals[findvar]}\\times\\sin(\\var{angle_dsp_vals[helpingvar]})}{\\var{side_dsp_vals[helpingvar]}}) = \\var{answer_deg}$° $\\var{answer_min}$'
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"obtuse": {"name": "obtuse", "group": "build the triangle", "definition": "if(angle_C_val>pi/2,1,0)", "description": "", "templateType": "anything", "can_override": false}, "findvar": {"name": "findvar", "group": "set up the problem", "definition": "random(0,1,2)", "description": "0 = A, 1 = B, 2 = C
", "templateType": "anything", "can_override": false}, "side_b_val": {"name": "side_b_val", "group": "build the triangle", "definition": "decimal(random(5..200)/10)", "description": "", "templateType": "anything", "can_override": false}, "side_c_val": {"name": "side_c_val", "group": "build the triangle", "definition": "decimal(random(side_b_val*10..min(250,2*side_b_val*10))/10)", "description": "", "templateType": "anything", "can_override": false}, "angle_A_deg": {"name": "angle_A_deg", "group": "build the triangle", "definition": "random(10..50)", "description": "", "templateType": "anything", "can_override": false}, "angle_A_min": {"name": "angle_A_min", "group": "build the triangle", "definition": "random(0..59)", "description": "", "templateType": "anything", "can_override": false}, "angle_A_val": {"name": "angle_A_val", "group": "build the triangle", "definition": "radians(angle_A_deg + angle_A_min/60)", "description": "", "templateType": "anything", "can_override": false}, "side_a_val": {"name": "side_a_val", "group": "build the triangle", "definition": "precround(cosrule_side(side_b_val,side_c_val,angle_A_val),1)", "description": "", "templateType": "anything", "can_override": false}, "angle_B_val": {"name": "angle_B_val", "group": "build the triangle", "definition": "round_to_min(cosrule_angle(side_a_val,side_c_val,side_b_val))", "description": "", "templateType": "anything", "can_override": false}, "angle_C_val": {"name": "angle_C_val", "group": "build the triangle", "definition": "round_to_min(pi-angle_A_val-angle_B_val)", "description": "", "templateType": "anything", "can_override": false}, "aA": {"name": "aA", "group": "display vars", "definition": "if (findvar=0,'A',if(helpingvar=0,angle_dsp_vals[0],''))", "description": "", "templateType": "anything", "can_override": false}, "aB": {"name": "aB", "group": "display vars", "definition": "if (findvar=1,'B',if(helpingvar=1,angle_dsp_vals[1],''))", "description": "", "templateType": "anything", "can_override": false}, "aC": {"name": "aC", "group": "display vars", "definition": "if (findvar=2,'C',if(helpingvar=2,angle_dsp_vals[2],''))", "description": "", "templateType": "anything", "can_override": false}, "sa": {"name": "sa", "group": "display vars", "definition": "if(findvar=0,string(side_dsp_vals[0])+' ' +units,if(helpingvar=0 or dsp3rdside=1,string(side_dsp_vals[0])+' ' +units,''))", "description": "", "templateType": "anything", "can_override": false}, "sb": {"name": "sb", "group": "display vars", "definition": "if(findvar=1,string(side_dsp_vals[1])+' ' +units,if(helpingvar=1 or dsp3rdside=1,string(side_dsp_vals[1])+' ' +units,''))", "description": "", "templateType": "anything", "can_override": false}, "sc": {"name": "sc", "group": "display vars", "definition": "if(findvar=2,string(side_dsp_vals[2])+' ' +units,if(helpingvar=2 or dsp3rdside=1,string(side_dsp_vals[2])+' ' +units,''))", "description": "", "templateType": "anything", "can_override": false}, "helpingvar": {"name": "helpingvar", "group": "set up the problem", "definition": "if(findvar=0,random(1,2),if(findvar=1,random(0,2),random(0,1)))", "description": "0=a, 1=b, 2=c
", "templateType": "anything", "can_override": false}, "side_vals": {"name": "side_vals", "group": "set up the problem", "definition": "[side_a_val,side_b_val,side_c_val]", "description": "", "templateType": "anything", "can_override": false}, "angle_vals": {"name": "angle_vals", "group": "set up the problem", "definition": "[angle_A_val,angle_B_val,angle_C_val]", "description": "", "templateType": "anything", "can_override": false}, "side_dsp_names": {"name": "side_dsp_names", "group": "set up the problem", "definition": "['a','b','c']", "description": "", "templateType": "anything", "can_override": false}, "angle_dsp_names": {"name": "angle_dsp_names", "group": "set up the problem", "definition": "['A','B','C']", "description": "", "templateType": "anything", "can_override": false}, "side_dsp_vals": {"name": "side_dsp_vals", "group": "set up the problem", "definition": "[precround(side_a_val,1),precround(side_b_val,1),precround(side_c_val,1)]", "description": "", "templateType": "anything", "can_override": false}, "angle_dsp_vals": {"name": "angle_dsp_vals", "group": "set up the problem", "definition": "[deg_to_degmin(degrees(angle_A_val)),deg_to_degmin(degrees(angle_B_val)),deg_to_degmin(degrees(angle_C_val))]", "description": "", "templateType": "anything", "can_override": false}, "unitchoices": {"name": "unitchoices", "group": "display vars", "definition": "['mm','cm','m','km']", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "display vars", "definition": "random(unitchoices)", "description": "", "templateType": "anything", "can_override": false}, "othervar": {"name": "othervar", "group": "set up the problem", "definition": "3-findvar-helpingvar", "description": "", "templateType": "anything", "can_override": false}, "answer_acute": {"name": "answer_acute", "group": "set up the problem", "definition": "arcsin(side_vals[findvar]*sin(angle_vals[helpingvar])/side_vals[helpingvar])", "description": "", "templateType": "anything", "can_override": false}, "dspchosenangle": {"name": "dspchosenangle", "group": "set up the problem", "definition": "angle_dsp_names[findvar]", "description": "", "templateType": "anything", "can_override": false}, "dsp3rdside": {"name": "dsp3rdside", "group": "display vars", "definition": "random(0,1)", "description": "0 = no
\n1 = yes
", "templateType": "anything", "can_override": false}, "answer_deg": {"name": "answer_deg", "group": "set up the problem", "definition": "decimal(split(deg_to_degmin(degrees(answer)),'\u00b0')[0])", "description": "", "templateType": "anything", "can_override": false}, "answer_min": {"name": "answer_min", "group": "set up the problem", "definition": "decimal(split(split(deg_to_degmin(degrees(answer)),'\u00b0')[1],\"'\")[0])", "description": "", "templateType": "anything", "can_override": false}, "test": {"name": "test", "group": "set up the problem", "definition": "angle_vals[findvar]>radians(90)", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "set up the problem", "definition": "if(angle_vals[findvar]>radians(90),radians(180)-answer_acute,answer_acute)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "build the triangle", "variables": ["side_a_val", "side_b_val", "side_c_val", "angle_A_deg", "angle_A_min", "angle_A_val", "angle_B_val", "angle_C_val", "obtuse", "test"]}, {"name": "display vars", "variables": ["aA", "aB", "aC", "sa", "sb", "sc", "unitchoices", "units", "dsp3rdside"]}, {"name": "set up the problem", "variables": ["findvar", "helpingvar", "othervar", "side_vals", "side_dsp_vals", "side_dsp_names", "angle_vals", "angle_dsp_vals", "angle_dsp_names", "answer_acute", "dspchosenangle", "answer_deg", "answer_min", "answer", "test"]}], "functions": {"deg_to_degmin": {"parameters": [["deg", "number"]], "type": "string", "language": "javascript", "definition": "min=Math.round((deg-Math.trunc(deg))*60);\ndegstr=String(Math.trunc(deg))+\"\u00b0\"+String(min)+\"'\";\nreturn degstr;"}, "dms": {"parameters": [["deg", "number"]], "type": "string", "language": "javascript", "definition": "degrees = Math.trunc(deg);\nmin = (deg - Math.trunc(deg))*60;\nminutes = Math.round(min);\nseconds = Math.round((min - Math.trunc(min))*6000)/100;\ndegstr=String(degrees)+\"\u00b0\"+String(minutes)+\"'\"+String(seconds)+\"''\";\nreturn degstr;"}, "cosrule_side": {"parameters": [["a", "number"], ["b", "number"], ["C", "number"]], "type": "number", "language": "javascript", "definition": "tmp=Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(C);\ntmp2 = Math.sqrt(tmp);\nreturn tmp2;"}, "sinerule_angle": {"parameters": [["a", "number"], ["b", "number"], ["angB", "number"]], "type": "number", "language": "javascript", "definition": "return Math.asin(a*Math.sin(angB)/b)"}, "cosrule_angle": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "type": "number", "language": "javascript", "definition": "num = Math.pow(a,2) + Math.pow(b,2) - Math.pow(c,2);\nden = 2 * a * b\nreturn Math.acos(num/den);"}, "round_to_min": {"parameters": [["angle", "number"]], "type": "number", "language": "javascript", "definition": "deg = angle * 180 / Math.PI;\ndegrees = Math.trunc(deg);\nmin = (deg - Math.trunc(deg))*60;\nminutes = Math.round(min);\nrounded = degrees + minutes/60;\nreturn rounded * Math.PI / 180;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "{dspchosenangle} = [[0]] °[[1]]'
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "degrees", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "answer_deg", "maxValue": "answer_deg", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "minutes", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "answer_min", "maxValue": "answer_min", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}, {"name": "bearings", "pickingStrategy": "random-subset", "pickQuestions": "3", "questionNames": ["", "", "", "", ""], "questions": [{"name": "bearing triangle - find a distance", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Students are given the bearings and distances of 2 consecutive straight line walks. They are asked to find the distance from the starting point to the endpoint. They are given a diagram to assist them.
\nThe bearings and distances are randomised (any bearing, distances between 1.1 and 5.). Bearings can be given as either compass bearings or true bearings.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "A group of people walk along a bearing {bearing1} for a distance of {w1} {units} to point F.
\nThey then walk along a bearing {bearing2} for a distance of {w2} {units} to point G.
\n{geogebra_applet('https://www.geogebra.org/m/szvpe7e2',defs)}
", "advice": "Let's call the starting point S. Connecting G back to S creates a triangle, SFG.
\nWe know the lengths of SF and FG. If we can work out the size of $\\angle SFG$ then we can use the cosine rule to find the length of GS.
\nWe can use geometry to work out that $\\angle SFG = \\var{included_angle}$°
\nThen the cosine rule states that
\n$c^2 = a^2 + b^2 - 2ab\\cos(C)$, so
\n$ c = \\sqrt{a^2 + b^2 - 2ab\\cos(C)}$
\nHence
\n$GS=\\sqrt{\\var{w1}^2+\\var{w2}^2-2\\times\\var{w1}\\times\\var{w2}\\times\\cos(\\var{included_angle})}°=\\var{length}$ {units}
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"defs": {"name": "defs", "group": "geogebra vars", "definition": "[\n ['w1',w1],['w2',w2],['a1',a1],['a2',a2]\n ]", "description": "", "templateType": "anything", "can_override": false}, "w1": {"name": "w1", "group": "geogebra vars", "definition": "decimal(random(10..50)/10)", "description": "the length of the first walk
", "templateType": "anything", "can_override": false}, "w2": {"name": "w2", "group": "geogebra vars", "definition": "decimal(random(10..50)/10)", "description": "the length of the second walk
", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "geogebra vars", "definition": "random(-90..269)", "description": "the first angle, rotated clockwise from the +x-axis
", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "geogebra vars", "definition": "random(-90..269)", "description": "the second angle, rotated clockwise from the +x-axis
", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "options", "definition": "random('m','km')", "description": "", "templateType": "anything", "can_override": false}, "compass_bearing": {"name": "compass_bearing", "group": "options", "definition": "random(0,1)", "description": "0 = compass bearing
\n1 = true bearing
", "templateType": "anything", "can_override": false}, "a1_true": {"name": "a1_true", "group": "calculations", "definition": "mod(a1+90,360)", "description": "a1 true bearing
", "templateType": "anything", "can_override": false}, "a2_true": {"name": "a2_true", "group": "calculations", "definition": "mod(a2+90,360)", "description": "a2 true bearing
", "templateType": "anything", "can_override": false}, "a1_compass": {"name": "a1_compass", "group": "calculations", "definition": "switch(a1_true=0,\"N\",\n 0a1 as a true bearing in a string
", "templateType": "anything", "can_override": false}, "a2_true_string": {"name": "a2_true_string", "group": "calculations", "definition": "lpad(string(a2_true)+\"\u00b0\",4,\"0\")", "description": "a2 as a true bearing string
", "templateType": "anything", "can_override": false}, "bearing1": {"name": "bearing1", "group": "display vars", "definition": "if(compass_bearing=0,a1_compass,a1_true_string)", "description": "angle 1 display version
", "templateType": "anything", "can_override": false}, "bearing2": {"name": "bearing2", "group": "display vars", "definition": "if(compass_bearing=0,a2_compass,a2_true_string)", "description": "angle 2 display version
", "templateType": "anything", "can_override": false}, "included_angle": {"name": "included_angle", "group": "calculations", "definition": "switch(a1_true=a2_true,180,\n (a1_true<=180 and a2_true<=180) or (a1_true>=180 and a2_true>=180),180-abs(a2_true-a1_true),\n (a1_true<=180 and a2_true>=180),if(180+a1_trueIf b1 <= 180 and b2 > 180 then
\nif 180 + b1 < b2 then included_angle = -180 - b1 + b2
\nif 180 + b1 > b2 then included_angle = 180 - b2 + b1
\nIf b1 >=180 and b2 < 180 then
\nif b1-180 < b2 then included_angle = 180 + b2 - b1
\nif b1 - 180 > b2 then included_angle = -180 - b2 + b1
", "templateType": "anything", "can_override": false}, "length": {"name": "length", "group": "calculations", "definition": "if(a1_true=a2_true,w1+w2,if(max(a1_true,a2_true)-180=min(a1_true,a2_true),abs(w1-w2),precround(cosrule_side(w1,w2,radians(included_angle)),1)))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "geogebra vars", "variables": ["w1", "w2", "a1", "a2", "defs"]}, {"name": "options", "variables": ["units", "compass_bearing"]}, {"name": "display vars", "variables": ["bearing1", "bearing2"]}, {"name": "calculations", "variables": ["a1_true", "a2_true", "a1_compass", "a2_compass", "a1_true_string", "a2_true_string", "included_angle", "length"]}], "functions": {"cosrule_side": {"parameters": [["a", "number"], ["b", "number"], ["C", "number"]], "type": "number", "language": "javascript", "definition": "tmp=Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(C);\ntmp2 = Math.sqrt(tmp);\nreturn tmp2;"}}, "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": "From their endpoint at G, many {units} are they from their starting point in a straight line?
\nGive your answer rounded to 1 decimal place.
", "minValue": "length-0.1", "maxValue": "length+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "identify the reverse bearing", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Students are shown a random bearing from A to B and asked to give the bearing from B to A as either a compass bearing or a true bearing.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "{geogebra_applet('https://www.geogebra.org/m/z3dqexx3',defs)}
\nThe bearing shown from A to B is {dsp_angle}.
", "advice": "To find a compass bearing going from B to A, we start with the compass bearing from A to B, and:
\n(1) replace N by S or S by N.
\n(2) leave the number in the middle unchanged.
\n(3) replace E by W or W by E.
\nTo find a true bearing going from B to A:
\nif the true bearing from A to B < 180°, then the bearing from B to A is 180° + bearing from A to B.
\nIf the true bearing from A to B is > 180°, then the bearing from B to A is bearing from A to B - 180°.
\nThen you need to give it in the correct format, which may mean converting from true bearing to compass bearing or the other way around.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"defs": {"name": "defs", "group": "geogebra vars", "definition": "[\n ['bearing_1',angle]\n ]", "description": "", "templateType": "anything", "can_override": false}, "angle": {"name": "angle", "group": "geogebra vars", "definition": "random(0..359)", "description": "", "templateType": "anything", "can_override": false}, "angle_compass": {"name": "angle_compass", "group": "display vars", "definition": "switch(angle=0,\"N\",\n 0You can copy the \" ° \" sign from here, or just leave it out of your answer.
", "answer": "{answer1}|{answer2}", "displayAnswer": "{answer1}", "matchMode": "regex"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "identify the compass bearing", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Student is shown a random bearing with the true bearing marked. They are asked to write it as a compass bearing.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "{geogebra_applet('https://www.geogebra.org/m/bc4zzurx',defs)}
", "advice": "The bearing is between {NS} and {EW}, so the bearing is of the form {NS}__{EW}.
\nWe need to compute the angle between {NS} and the bearing line.
\nThis is given by {calc_advice}.
\nso the compass bearing is {angle_compass}.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"defs": {"name": "defs", "group": "geogebra vars", "definition": "[\n ['bearing_1',angle]\n ]", "description": "", "templateType": "anything", "can_override": false}, "angle": {"name": "angle", "group": "geogebra vars", "definition": "random(0..359)", "description": "", "templateType": "anything", "can_override": false}, "angle_compass": {"name": "angle_compass", "group": "display vars", "definition": "switch(angle=0,\"N\",\n 0Give this bearing as a compass bearing.
\nYou can copy the \" ° \" sign from here and paste it, or you can just leave it out.
", "answer": "{angle_compass}|{angle_compass_2}", "displayAnswer": "{angle_compass}", "matchMode": "regex"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "identify the true bearing", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Students are shown a random bearing and given its value as a compass bearing.
\nThey are asked to give its value as a true bearing.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "{geogebra_applet('https://www.geogebra.org/m/qtxdyg2g',defs)}
\nThe bearing shown is {angle_compass}.
", "advice": "Since the bearing is in the {NS}{EW} quadrant,
\n{true_bearing}
\nDon't forget to give your true bearing as a 3-digit number!
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"defs": {"name": "defs", "group": "geogebra vars", "definition": "[\n ['bearing_1',angle]\n ]", "description": "", "templateType": "anything", "can_override": false}, "angle": {"name": "angle", "group": "geogebra vars", "definition": "random(0..359)", "description": "", "templateType": "anything", "can_override": false}, "angle_compass": {"name": "angle_compass", "group": "display vars", "definition": "switch(angle=0,\"N\",\n 0You can copy the \" ° \" sign from here, or just leave it out.
", "answer": "{angle_true}|{angle_true_2}", "displayAnswer": "{angle_true}", "matchMode": "regex"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "radial survey", "extensions": [], "custom_part_types": [], "resources": [["question-resources/radial_survey_1.png", "/srv/numbas/media/question-resources/radial_survey_1.png"], ["question-resources/radial_survey_2.png", "/srv/numbas/media/question-resources/radial_survey_2.png"], ["question-resources/radial_survey_3.png", "/srv/numbas/media/question-resources/radial_survey_3.png"], ["question-resources/radial_survey_4.png", "/srv/numbas/media/question-resources/radial_survey_4.png"], ["question-resources/radial_survey_5.png", "/srv/numbas/media/question-resources/radial_survey_5.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Students are shown one of 5 different radial surveys and asked to answer one of 8 questions about it.
\n2 questions ask for the length of a side.
\n2 questions ask for the value of an angle.
\n2 questions ask for the area of a triangle.
\n1 question asks for the land area, and 1 question asks for the land perimeter.
\nThe values are hard coded. In cases where your choice of precision affects your answer, a range of answers is accepted, and a comment is made in the advice to that effect.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "The diagram from a radial survey is shown.
\n{image('resources/question-resources/'+image)}
\nnot to scale
", "advice": "{advice}
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"question_array": {"name": "question_array", "group": "Ungrouped variables", "definition": "[\"What is the distance from B to C, in {units}?answers to each question for each image
\nanswer[image][question]
\n[\"What is the distance from B to C?\",
\"What is the distance from D to B?\",
\"What is the area of the land enclosed by the centre point, B and C?\",
\"What is the area of land enclosed by the centre point, B and D?\"
\"What is the area of the land?\",
\"What is the perimeter of the land?\",
]
worked answers to each question for each image
\nadvice[image][question]
\n[\"What is the distance from B to C?\",
\"What is the distance from D to B?\",
\"What is the area of the land enclosed by the centre point, B and C?\",
\"What is the area of land enclosed by the centre point, B and D?\"
\"What is the area of the land?\",
\"What is the perimeter of the land?\",
]
{question}
\n", "minValue": "answer", "maxValue": "answer_max", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}, {"name": "Harder", "pickingStrategy": "random-subset", "pickQuestions": "2", "questionNames": ["", "", "", ""], "questions": [{"name": "2 triangle problem with angle of depression", "extensions": [], "custom_part_types": [], "resources": [["question-resources/angleofdepression_problem.svg", "/srv/numbas/media/question-resources/angleofdepression_problem.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Students are given a diagram with 2 triangles. They are given 2 randomised lengths, and a randomised angle of depression.
\nThey need to compute an angle by subtracting the angle of depression from 90°. Then they need to use the sine rule to calculate a second angle. Then they need to use the alternate angles on parallel lines theorem to work out a third angle. They use these to calculate a third angle, which they use in the right-angle triangle with the sine ratio to compute the third side. They then use the cos ratio to compute the length of the third side.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "A person standing on the top of a building at $J$ looks down to a garden on the ground at point $M$. The angle of depression from $J$ to $M$ is $\\var{aod}$°. There is a window in the building at $K$, $\\var{JK}$ metres below $J$. The distance from $M$ to $K$ is $\\var{KM}$ metres.
\n\nnot to scale
\n", "advice": "$\\angle MJK = 90° - \\var{aod}° = \\var{aMJK}°$
\nIn $\\triangle JKM$, by the sine rule, $\\frac{JK}{\\sin (\\angle M)}=\\frac{KM}{\\sin (\\angle J)}$
\n$\\frac{\\var{JK}}{\\sin (\\angle M)}=\\frac{\\var{KM}}{\\sin \\var{aMJK}°}$
\n$\\angle M = \\angle JMK = \\var{aJMK}°$
\n\nNow $\\angle JML = \\var{aod}$° (alternate angles on parallel lines)
\nSo $\\angle KML = \\angle JML - \\angle JMK = \\var{aod}° - \\var{aJMK}° = \\var{aKML}° $
\nThe angle of elevation from $M$ to $K$ is $\\var{aKML}° $.
\n\n$\\triangle KML$ is a right-angle triangle, and $\\angle KML = 90°$
\nSo to find $KL$ we can use the sine ratio: $\\sin(angle)=\\frac{opposite}{hypotenuse}$
\n$\\sin(\\var{aKML})° = \\frac{KL}{\\var{KM}}$
\n$KL = \\var{KM} \\times \\sin(\\var{aKML}°) = \\var{KL}$ m
\nThe distance from the ground to $K$ is $\\var{KL}$ m.
\n\nTo find $LM$ we can use the cosine ratio: $\\cos(angle)=\\frac{adjacent}{hypotenuse}$
\n$\\cos(\\var{aKML})° = \\frac{LM}{\\var{KM}}$
\n$LM = \\var{KM} \\times \\cos(\\var{aKML}°) = \\var{LM}$ m
\nThe distance from the pond to the building is $\\var{LM}$ m.
\n", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"aod": {"name": "aod", "group": "Ungrouped variables", "definition": "random(50..75)", "description": "", "templateType": "anything", "can_override": false}, "JK": {"name": "JK", "group": "Ungrouped variables", "definition": "random(2..25)", "description": "", "templateType": "anything", "can_override": false}, "KM": {"name": "KM", "group": "Ungrouped variables", "definition": "random(JK..JK*2)", "description": "", "templateType": "anything", "can_override": false}, "aMJK": {"name": "aMJK", "group": "Ungrouped variables", "definition": "90-aod", "description": "", "templateType": "anything", "can_override": false}, "aJMK": {"name": "aJMK", "group": "Ungrouped variables", "definition": "round(degrees(arcsin(JK*sin(radians(aMJK))/KM )))", "description": "", "templateType": "anything", "can_override": false}, "KL": {"name": "KL", "group": "Ungrouped variables", "definition": "round(KM * sin(radians(aKML)))", "description": "", "templateType": "anything", "can_override": false}, "aKML": {"name": "aKML", "group": "Ungrouped variables", "definition": "aod-aJMK", "description": "", "templateType": "anything", "can_override": false}, "KLmin": {"name": "KLmin", "group": "Ungrouped variables", "definition": "round(KM * sin(radians(aKML-1))-0.1)", "description": "", "templateType": "anything", "can_override": false}, "KLmax": {"name": "KLmax", "group": "Ungrouped variables", "definition": "round(KM * sin(radians(aKML+1))+0.1)", "description": "", "templateType": "anything", "can_override": false}, "LM": {"name": "LM", "group": "Ungrouped variables", "definition": "round(KM * cos(radians(aKML)))", "description": "", "templateType": "anything", "can_override": false}, "LMmin": {"name": "LMmin", "group": "Ungrouped variables", "definition": "round(KM * cos(radians(aKML-1))-0.1)", "description": "", "templateType": "anything", "can_override": false}, "LMmax": {"name": "LMmax", "group": "Ungrouped variables", "definition": "round(KM * cos(radians(aKML+1))+0.1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["aod", "JK", "KM", "aMJK", "aJMK", "aKML", "KL", "KLmin", "KLmax", "LM", "LMmin", "LMmax"], "variable_groups": [], "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": "Calculate the angle of elevation from $M$ to $K$. Give your answer to the nearest degree.
", "minValue": "aKML-1", "maxValue": "aKML+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "What is the distance, in metres, from the ground (at $L$) to the window (at $K$)? Give your answer to the nearest metre.
", "minValue": "{KLmin}", "maxValue": "{KLmax}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "How far is it, in metres, from the building to the garden (i.e. what is the length of $LM$)?
\nGive your answer to the nearest metre.
", "minValue": "{LMmin}", "maxValue": "{LMmax}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "2 triangle problem with ramp", "extensions": [], "custom_part_types": [], "resources": [["question-resources/ramp_problem_jGRPkmC.png", "/srv/numbas/media/question-resources/ramp_problem_jGRPkmC.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Students are given 2 right-angle triangles - two ramps of differing steepness up a step, and are asked to find one of a selection of randomly chosen lengths. The height of the step is given - it is randomised. Students are also given either the angle of incline of the steeper ramp or its length, both of which are randomised. They are also given the angle of incline of the shallower ramp, which is also randomised.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "A {height} metre high rise is represented by BT in the diagram. There is an existing ramp, XT, from the lower level to the upper level, but it has been deemed too steep, and a new ramp, YT, is to be built. The angle between the ground and the new ramp is to be {BYT}°.
\n\nnot to scale
", "advice": "$\\triangle BTX$ and $\\triangle BTY$ are right-angle triangles. So we can use the trigonometric ratios to determine the lengths of the sides.
\nTo find the difference between $YT$ and $XT$ we need to first find $YT$ and $XT$.
\nWe can find $YT$ using the sine ratio: $\\sin(\\angle BYT) = \\frac{opposite}{hypotenuse}$
\n$\\sin(\\var{BYT}°) = \\frac{\\var{height}}{YT}$
\nSo $YT = \\var{YT}$ m
\nWe can also find $XT$ using the sine ratio:
\n$sin(\\var{BXT}°) = \\frac{\\var{height}}{XT}$
\nSo $XT = \\var{XT}$ m
\nThe difference in lengths is $YT - XT = \\var{YT}-\\var{XT}=\\var{YT-XT}$ m
\nTo find length $XY$ we first need to find $XB$ and $YB$.
\nWe can find $XB$ using the tan ratio: $\\tan(\\angle BXT) = \\frac{opposite}{adjacent}$
\n$\\tan(\\var{BXT}°) = \\frac{\\var{height}}{XB}$
\nSo $XB=\\var{BX}$ m
\nWe can find $XB$ using Pythagoras' Theorem: $a^2 + b^2=c^2$
\n$\\var{XT}^2=\\var{height}^2+XB^2$
\nSo $XB=\\var{BX}$ m
\nWe can also find $YB$ using the tan ratio: $\\tan(\\angle BYT) = \\frac{opposite}{adjacent}$
\n$\\tan(\\var{BYT}°) = \\frac{\\var{height}}{YB}$
\nSo $YB=\\var{BY}$ m
\nTherefore, $XY = YB - XB = \\var{BY}-\\var{BX}=\\var{XY}$ m
\nYour answer may differ slightly (by up to 0.1) due to rounding as the computer solves the problem using a different method.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"info": {"name": "info", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything", "can_override": false}, "question": {"name": "question", "group": "Ungrouped variables", "definition": "random(0..2)", "description": "", "templateType": "anything", "can_override": false}, "infolist": {"name": "infolist", "group": "Ungrouped variables", "definition": "[\"the angle between the ground and the old ramp is {BXT}\u00b0\",\n \"the length of the old ramp is {XT} m\"\n]", "description": "", "templateType": "anything", "can_override": false}, "questionlist": {"name": "questionlist", "group": "Ungrouped variables", "definition": "[\"what will be the length of the new ramp, in metres\",\n \"how much longer will the new ramp be than the old ramp, in metres\", \n \"what is the distance, in metres, from Y to X\"]", "description": "", "templateType": "anything", "can_override": false}, "height": {"name": "height", "group": "Ungrouped variables", "definition": "random(1..50)*0.1", "description": "", "templateType": "anything", "can_override": false}, "BYT": {"name": "BYT", "group": "Ungrouped variables", "definition": "random(5..15)", "description": "", "templateType": "anything", "can_override": false}, "BXT": {"name": "BXT", "group": "Ungrouped variables", "definition": "random(BYT+1..30)", "description": "", "templateType": "anything", "can_override": false}, "XT": {"name": "XT", "group": "Ungrouped variables", "definition": "precround(height/sin(radians(BXT)),1)", "description": "", "templateType": "anything", "can_override": false}, "YT": {"name": "YT", "group": "Ungrouped variables", "definition": "precround(height/sin(radians(BYT)),1)", "description": "", "templateType": "anything", "can_override": false}, "BX": {"name": "BX", "group": "Ungrouped variables", "definition": "precround(height/tan(radians(BXT)),1)", "description": "", "templateType": "anything", "can_override": false}, "BY": {"name": "BY", "group": "Ungrouped variables", "definition": "precround(height/tan(radians(BYT)),1)", "description": "", "templateType": "anything", "can_override": false}, "XY": {"name": "XY", "group": "Ungrouped variables", "definition": "BY-BX", "description": "", "templateType": "anything", "can_override": false}, "answerlist": {"name": "answerlist", "group": "Ungrouped variables", "definition": "[YT,YT-XT,XY]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["info", "question", "infolist", "questionlist", "height", "BYT", "BXT", "XT", "YT", "BX", "BY", "XY", "answerlist"], "variable_groups": [], "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": "If the {infolist[info]}, {questionlist[question]}?
\nRound your answer to 1 decimal place.
", "minValue": "{answerlist[question]}-0.1", "maxValue": "{answerlist[question]}+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "bearing triangle - find a bearing", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "Students are given the bearings and distances of 2 consecutive straight line walks. They are asked to find the distance from the starting point to the endpoint. They are given a diagram to assist them.
\nThe bearings and distances are randomised (any bearing, distances between 1.1 and 5.). Bearings can be given as either compass bearings or true bearings.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "*** This is a challenge question! ***
\nA group of people walk along a bearing {bearing1} for a distance of {w1} {units} to point F.
\nThey then walk along a bearing {bearing2} for a distance of {w2} {units} to point G.
\n{geogebra_applet('https://www.geogebra.org/m/szvpe7e2',defs)}
\n", "advice": "Let's call the starting point $S$. Connecting $G$ back to $S$ creates a triangle, $\\triangle SFG$.
\nWe know the lengths of $SF$ and $FG$. If we can work out the size of $\\angle SFG$ then we can use the cosine rule to find the value of $\\angle FSG$.
\nWe could also use the sine rule, but we would additionally need to check whether or not $\\angle FSG$ was obtuse as the sine rule will always give us an acute angle value. Both methods will work, but we will use the cos rule here.
\nWe can use geometry to work out that $\\angle SFG = \\var{included_angle}$°
\nThen the cosine rule states that
\n$c^2 = a^2 + b^2 - 2ab\\cos(C)$, so
\n$ c = \\sqrt{a^2 + b^2 - 2ab\\cos(C)}$
\nHence
\n$GS=\\sqrt{\\var{w1}^2+\\var{w2}^2-2\\times\\var{w1}\\times\\var{w2}\\times\\cos(\\var{included_angle})}°=\\var{length}$ {units}
\nThen, by the cos rule:
\n$\\angle FSG = \\frac{SG^2 + SF^2 - FG^2}{2 \\times SG \\times SF}$
\n$\\angle FSG = \\frac{\\var{length}^2+\\var{w1}^2-\\var{w2}^2}{2 \\times \\var{length} \\times \\var{w1}} = \\var{angleFSG}$
\nWe can see that (the bearing from $S$ to $G$) = (the bearing from $S$ to $F$) {sign} $\\angle FSG = \\var{a1_true} \\var{sign} \\var{angleFSG} = \\var{StoG_true}$
\nBut we need the bearing from $G$ to $S = \\var{StoG_true} + 180°$. If this is greater than $360°$, then we need to subtract $360°$ from the answer.
\nSo the true bearing from $G$ to $S$ is $\\var{GtoS_true}$.
\n\nWe are asked to give the bearing as a compass bearing. This is $\\var{answer}$.
\n\n", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"defs": {"name": "defs", "group": "geogebra vars", "definition": "[\n ['w1',w1],['w2',w2],['a1',a1],['a2',a2]\n ]", "description": "", "templateType": "anything", "can_override": false}, "w1": {"name": "w1", "group": "geogebra vars", "definition": "decimal(random(10..50)/10)", "description": "the length of the first walk
", "templateType": "anything", "can_override": false}, "w2": {"name": "w2", "group": "geogebra vars", "definition": "decimal(random(10..50)/10)", "description": "the length of the second walk
", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "geogebra vars", "definition": "random(-90..269)", "description": "the first angle, rotated clockwise from the +x-axis
", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "geogebra vars", "definition": "random(-90..269)", "description": "the second angle, rotated clockwise from the +x-axis
", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "options", "definition": "random('m','km')", "description": "", "templateType": "anything", "can_override": false}, "compass_bearing": {"name": "compass_bearing", "group": "options", "definition": "random(0,1)", "description": "0 = compass bearing
\n1 = true bearing
", "templateType": "anything", "can_override": false}, "q_no": {"name": "q_no", "group": "options", "definition": "random(0..1)", "description": "", "templateType": "anything", "can_override": false}, "questions": {"name": "questions", "group": "options", "definition": "[ \"What is the bearing from the starting point to the people?\",\n \"What is the bearing from the people to the starting point?\"]", "description": "", "templateType": "anything", "can_override": false}, "a1_true": {"name": "a1_true", "group": "calculations", "definition": "mod(a1+90,360)", "description": "a1 true bearing
", "templateType": "anything", "can_override": false}, "a2_true": {"name": "a2_true", "group": "calculations", "definition": "mod(a2+90,360)", "description": "a2 true bearing
", "templateType": "anything", "can_override": false}, "a1_compass": {"name": "a1_compass", "group": "calculations", "definition": "switch(a1_true=0,\"N\",\n 0a1 as a true bearing in a string
", "templateType": "anything", "can_override": false}, "a2_true_string": {"name": "a2_true_string", "group": "calculations", "definition": "lpad(string(a2_true)+\"\u00b0\",4,\"0\")", "description": "a2 as a true bearing string
", "templateType": "anything", "can_override": false}, "bearing1": {"name": "bearing1", "group": "display vars", "definition": "if(compass_bearing=0,a1_compass,a1_true_string)", "description": "angle 1 display version
", "templateType": "anything", "can_override": false}, "bearing2": {"name": "bearing2", "group": "display vars", "definition": "if(compass_bearing=0,a2_compass,a2_true_string)", "description": "angle 2 display version
", "templateType": "anything", "can_override": false}, "included_angle": {"name": "included_angle", "group": "calculations", "definition": "switch(a1_true=a2_true,180,\n (a1_true<=180 and a2_true<=180) or (a1_true>=180 and a2_true>=180),180-abs(a2_true-a1_true),\n (a1_true<=180 and a2_true>=180),if(180+a1_trueIf b1 <= 180 and b2 > 180 then
\nif 180 + b1 < b2 then included_angle = -180 - b1 + b2
\nif 180 + b1 > b2 then included_angle = 180 - b2 + b1
\nIf b1 >=180 and b2 < 180 then
\nif b1-180 < b2 then included_angle = 180 + b2 - b1
\nif b1 - 180 > b2 then included_angle = -180 - b2 + b1
", "templateType": "anything", "can_override": false}, "length": {"name": "length", "group": "calculations", "definition": "precround(cosrule_side(w1,w2,radians(included_angle)),1)", "description": "", "templateType": "anything", "can_override": false}, "side_SG": {"name": "side_SG", "group": "calculations", "definition": "cosrule_side(w1,w2,radians(included_angle))", "description": "", "templateType": "anything", "can_override": false}, "angleFSG": {"name": "angleFSG", "group": "calculations", "definition": "round(degrees(cosrule_angle(w1,side_SG,w2)))", "description": "", "templateType": "anything", "can_override": false}, "angleFGS": {"name": "angleFGS", "group": "calculations", "definition": "round(degrees(cosrule_angle(w2,side_SG,w1)))", "description": "", "templateType": "anything", "can_override": false}, "bearing_StoG": {"name": "bearing_StoG", "group": "calculations", "definition": "switch(\n b1=b2,\n b1,\n max(b1,b2)-180 = min(b1,b2),\n if(w1>w2,b1,b2),\n (b1<=180 and b2<=180) or (b1 > 180 and b2 > 180),\n if(b1>b2,b1-angleFSG,b1+angleFSG),\n (b1 <= 180 and b2 > 180) and (b1 +180 > b2),\n mod(b1 + angleFSG,360),\n (b1 <= 180 and b2 > 180) and (b1 +180 < b2),\n mod(b1 - angleFSG,360),\n (b1 > 180 and b2 <= 180) and (b1 < b2 + 180),\n mod(b1 - angleFSG,360),\n (b1 > 180 and b2 <= 180) and (b1 > b2 + 180),\n mod(b1 + angleFSG,360),\n 0\n)", "description": "", "templateType": "anything", "can_override": false}, "bearing_GtoS": {"name": "bearing_GtoS", "group": "calculations", "definition": "mod(bearing_StoG+180,360)", "description": "", "templateType": "anything", "can_override": false}, "StoG_compass": {"name": "StoG_compass", "group": "calculations", "definition": "true2compass(bearing_StoG)", "description": "", "templateType": "anything", "can_override": false}, "GtoS_compass": {"name": "GtoS_compass", "group": "calculations", "definition": "true2compass(bearing_GtoS)", "description": "", "templateType": "anything", "can_override": false}, "StoG_true": {"name": "StoG_true", "group": "calculations", "definition": "string(bearing_StoG)+'\u00b0'", "description": "", "templateType": "anything", "can_override": false}, "GtoS_true": {"name": "GtoS_true", "group": "calculations", "definition": "string(bearing_GtoS)+'\u00b0'", "description": "", "templateType": "anything", "can_override": false}, "answers": {"name": "answers", "group": "answers", "definition": "[[StoG_true, StoG_compass],[GtoS_true, GtoS_compass]]", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "display vars", "definition": "answers[q_no][compass_bearing]", "description": "", "templateType": "anything", "can_override": false}, "answer_min": {"name": "answer_min", "group": "display vars", "definition": "answers_min[q_no][compass_bearing]", "description": "", "templateType": "anything", "can_override": false}, "answer_max": {"name": "answer_max", "group": "display vars", "definition": "answers_max[q_no][compass_bearing]", "description": "", "templateType": "anything", "can_override": false}, "answers_min": {"name": "answers_min", "group": "answers", "definition": "[[StoG_true_min, StoG_compass_min],[GtoS_true_min, GtoS_compass_min]]", "description": "", "templateType": "anything", "can_override": false}, "answers_max": {"name": "answers_max", "group": "answers", "definition": "[[StoG_true_max, StoG_compass_max],[GtoS_true_max, GtoS_compass_max]]", "description": "", "templateType": "anything", "can_override": false}, "StoG_compass_min": {"name": "StoG_compass_min", "group": "answers", "definition": "true2compass(bearing_StoG-1)", "description": "", "templateType": "anything", "can_override": false}, "StoG_compass_max": {"name": "StoG_compass_max", "group": "answers", "definition": "true2compass(bearing_StoG+1)", "description": "", "templateType": "anything", "can_override": false}, "GtoS_compass_min": {"name": "GtoS_compass_min", "group": "answers", "definition": "true2compass(bearing_GtoS-1)", "description": "", "templateType": "anything", "can_override": false}, "GtoS_compass_max": {"name": "GtoS_compass_max", "group": "answers", "definition": "true2compass(bearing_GtoS+1)", "description": "", "templateType": "anything", "can_override": false}, "StoG_true_min": {"name": "StoG_true_min", "group": "answers", "definition": "string(bearing_StoG-1)+'\u00b0'", "description": "", "templateType": "anything", "can_override": false}, "StoG_true_max": {"name": "StoG_true_max", "group": "answers", "definition": "string(bearing_StoG+1)+'\u00b0'", "description": "", "templateType": "anything", "can_override": false}, "GtoS_true_min": {"name": "GtoS_true_min", "group": "answers", "definition": "string(bearing_GtoS-1)+'\u00b0'", "description": "", "templateType": "anything", "can_override": false}, "GtoS_true_max": {"name": "GtoS_true_max", "group": "answers", "definition": "string(bearing_GtoS+1)+'\u00b0'", "description": "", "templateType": "anything", "can_override": false}, "sign": {"name": "sign", "group": "display vars", "definition": "switch(\n b1=b2,\n \" = \",\n max(b1,b2)-180 = min(b1,b2),\n \" = -\",\n (b1<=180 and b2<=180) or (b1 > 180 and b2 > 180),\n if(b1>b2,\" - \",\" + \"),\n (b1 <= 180 and b2 > 180) and (b1 +180 > b2),\n \" + \",\n (b1 <= 180 and b2 > 180) and (b1 +180 < b2),\n \" - \",\n (b1 > 180 and b2 <= 180) and (b1 < b2 + 180),\n \" - \",\n (b1 > 180 and b2 <= 180) and (b1 > b2 + 180),\n \" + \"\n)", "description": "", "templateType": "anything", "can_override": false}, "answer2": {"name": "answer2", "group": "display vars", "definition": "split(answer,\"\u00b0\")[0]+if(split(answer,\"\u00b0\")[0]=answer,\"\",split(answer,\"\u00b0\")[1])", "description": "", "templateType": "anything", "can_override": false}, "answer2_min": {"name": "answer2_min", "group": "display vars", "definition": "split(answer_min,\"\u00b0\")[0]+if(split(answer_min,\"\u00b0\")[0]=answer_min,\"\",split(answer_min,\"\u00b0\")[1])", "description": "", "templateType": "anything", "can_override": false}, "answer2_max": {"name": "answer2_max", "group": "display vars", "definition": "split(answer_max,\"\u00b0\")[0]+if(split(answer_max,\"\u00b0\")[0]=answer_max,\"\",split(answer_max,\"\u00b0\")[1])", "description": "", "templateType": "anything", "can_override": false}, "answer_type": {"name": "answer_type", "group": "display vars", "definition": "[\"true bearing\", \"compass_bearing\"]", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "calculations", "definition": "a1_true", "description": "bearing 1 - from S to F
", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "calculations", "definition": "a2_true", "description": "bearing 2 - from F to G
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "geogebra vars", "variables": ["w1", "w2", "a1", "a2", "defs"]}, {"name": "options", "variables": ["units", "compass_bearing", "q_no", "questions"]}, {"name": "display vars", "variables": ["bearing1", "bearing2", "answer", "answer_min", "answer_max", "sign", "answer2", "answer2_min", "answer2_max", "answer_type"]}, {"name": "calculations", "variables": ["a1_true", "a2_true", "a1_compass", "a2_compass", "a1_true_string", "a2_true_string", "included_angle", "angleFSG", "angleFGS", "length", "side_SG", "bearing_StoG", "bearing_GtoS", "StoG_compass", "GtoS_compass", "StoG_true", "GtoS_true", "b1", "b2"]}, {"name": "answers", "variables": ["answers", "answers_min", "answers_max", "StoG_compass_min", "StoG_compass_max", "GtoS_compass_min", "GtoS_compass_max", "StoG_true_min", "StoG_true_max", "GtoS_true_min", "GtoS_true_max"]}], "functions": {"cosrule_side": {"parameters": [["a", "number"], ["b", "number"], ["C", "number"]], "type": "number", "language": "javascript", "definition": "tmp=Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(C);\ntmp2 = Math.sqrt(tmp);\nreturn tmp2;"}, "sinerule_angle": {"parameters": [["a", "number"], ["b", "number"], ["angB", "number"]], "type": "number", "language": "javascript", "definition": "return Math.asin(a*Math.sin(angB)/b)"}, "cosrule_angle": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "type": "number", "language": "javascript", "definition": "num = Math.pow(a,2) + Math.pow(b,2) - Math.pow(c,2);\nden = 2 * a * b\nreturn Math.acos(num/den);"}, "true2compass": {"parameters": [["a1_true", "number"]], "type": "number", "language": "jme", "definition": "switch(a1_true=0,\"N\",\n 0Give your answer as a {answer_type[compass_bearing]}.
\nGive your answer rounded to the nearest degree.
\nYou can copy the \"°\" symbol from here, or just leave it out from your answer.
", "answer": "{answer_min}$|^{answer}$|^{answer_max}$|^{answer2_min}$|^{answer2}$|^{answer2_max}", "displayAnswer": "{answer}", "matchMode": "regex"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Find the area of a triangle given by 2 bearings and 1 side", "extensions": [], "custom_part_types": [], "resources": [["question-resources/park.png", "/srv/numbas/media/question-resources/park.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "The student is given a triangle with one side running N-S. They are given bearings for the other two sides. They are given the length of the N-S side.
\nThe bearings and the length are randomised.
\nThey are then asked to find the area and the perimeter of the triangle.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "A triangular block of land is to be declared a park. On the east, the land is bounded by a road that runs north-south. The length of the road-park boundary is {length} m.
\nThe bearing from the northernmost point of the park along the northwestern boundary is {dsp_bearing1}.
\nThe bearing from the southernmost point of the park along the southwestern boundary is {dsp_bearing2}.
\n\nnot to scale
\n", "advice": "We can work out the angle at the northernmost tip of the park as $\\var{a1}$°.
\nWe can work out the angle at the southernmost tip of the park as $\\var{a2}$°.
\nWe can subtract these angles from 180° to find the value of the angle at the westernmost tip of the park. This is $\\var{a3}$°.
\nNow we can use the sine rule to calculate the length of one of the other two boundaries.
\nFor example:
\n$\\frac{NW \\, boundary}{\\sin (\\var{a2}°)}=\\frac{\\var{length}}{\\sin (\\var{a3}°)}$
\nSo NW boundary $= \\var{nw_len}$ m
\nNow we can compute the area using $A = \\frac{1}{2}ab\\sin (C)$
\n$Area = \\frac{1}{2} \\times \\var{nw_len} \\times \\var{length} \\times \\sin (\\var{a1}°) = \\var{area3}$ m$^2$
\nWe can use the sine rule again to find the length of the other boundary:
\n$\\frac{SW \\, boundary}{\\sin (\\var{a1}°)}=\\frac{\\var{length}}{\\sin (\\var{a3}°)}$
\nSo SW boundary $= \\var{sw_len}$ m
\nThen the perimeter of the park = $\\var{length} + \\var{nw_len} + \\var{sw_len} = \\var{perimeter}$ m.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"length": {"name": "length", "group": "Ungrouped variables", "definition": "random(50..1000)", "description": "", "templateType": "anything", "can_override": false}, "is_compass": {"name": "is_compass", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "0=true
\n1=compass
", "templateType": "anything", "can_override": false}, "bearing1": {"name": "bearing1", "group": "Ungrouped variables", "definition": "random(200..250)", "description": "", "templateType": "anything", "can_override": false}, "bearing2": {"name": "bearing2", "group": "Ungrouped variables", "definition": "random(290..340)", "description": "", "templateType": "anything", "can_override": false}, "dsp_bearing1": {"name": "dsp_bearing1", "group": "Ungrouped variables", "definition": "if(is_compass=1,\"S\"+string(bearing1-180)+\"\u00b0W\",string(bearing1)+\"\u00b0\")", "description": "", "templateType": "anything", "can_override": false}, "dsp_bearing2": {"name": "dsp_bearing2", "group": "Ungrouped variables", "definition": "if(is_compass=1,\"N\"+string(360-bearing2)+\"\u00b0W\",string(bearing2)+\"\u00b0\")", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "bearing1-180", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "360-bearing2", "description": "", "templateType": "anything", "can_override": false}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "180-a1-a2", "description": "", "templateType": "anything", "can_override": false}, "nw_len": {"name": "nw_len", "group": "Ungrouped variables", "definition": "precround(sin(radians(a2))/sin(radians(a3))*length,2)", "description": "", "templateType": "anything", "can_override": false}, "sw_len": {"name": "sw_len", "group": "Ungrouped variables", "definition": "precround(sin(radians(a1))/sin(radians(a3))*length,2)", "description": "", "templateType": "anything", "can_override": false}, "area1": {"name": "area1", "group": "Ungrouped variables", "definition": "round(0.5*nw_len*sw_len*sin(radians(a3)))", "description": "", "templateType": "anything", "can_override": false}, "area2": {"name": "area2", "group": "Ungrouped variables", "definition": "round(0.5*length*sw_len*sin(radians(a2)))", "description": "", "templateType": "anything", "can_override": false}, "area3": {"name": "area3", "group": "Ungrouped variables", "definition": "round(0.5*nw_len*length*sin(radians(a1)))", "description": "", "templateType": "anything", "can_override": false}, "area": {"name": "area", "group": "Ungrouped variables", "definition": "round((area1+area2+area3)/3)", "description": "", "templateType": "anything", "can_override": false}, "perimeter": {"name": "perimeter", "group": "Ungrouped variables", "definition": "round(length+nw_len+sw_len)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["length", "is_compass", "bearing1", "bearing2", "dsp_bearing1", "dsp_bearing2", "a1", "a2", "a3", "nw_len", "sw_len", "area1", "area2", "area3", "area", "perimeter"], "variable_groups": [], "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": "What is the area of the park, in square metres? Round your answer to the nearest square metre.
", "minValue": "{area}-1", "maxValue": "{area}+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "A fence needs to be built around the perimeter of the park. How many metres of fencing is required?
\nRound your answer to the nearest metre.
", "minValue": "perimeter-1", "maxValue": "perimeter+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "This set of practice questions will change each time that you open them.
\nAfter you have attempted a question, press \"submit answer\" and it will tell you whether or not you are correct.
\nAfter you have attempted a question, you can see a worked solution. Press \"reveal answers\", then click \"OK\" on the popup message. A worked solution will appear at the bottom of the screen.
\nIf you would like more practice on a particular type of question, click \"Try another question like this one\", and click \"OK\" on the popup message. A new version of the same question will appear.
\nIf your screen is large enough, you can go to any question that you wish via the menu on the left hand side. Otherwise, you can scroll through the questions using the arrow buttons at the top left of the screen.
", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "extensions": ["geogebra"], "custom_part_types": [], "resources": [["question-resources/RATriangle1_b6o8mmj.svg", "/srv/numbas/media/question-resources/RATriangle1_b6o8mmj.svg"], ["question-resources/RATriangle2_cpZr4Au.svg", "/srv/numbas/media/question-resources/RATriangle2_cpZr4Au.svg"], ["question-resources/RATriangle3_1rlsOwN.svg", "/srv/numbas/media/question-resources/RATriangle3_1rlsOwN.svg"], ["question-resources/RATriangle4_UsnxMD2.svg", "/srv/numbas/media/question-resources/RATriangle4_UsnxMD2.svg"], ["question-resources/RATriangle2_V82JKE5.svg", "/srv/numbas/media/question-resources/RATriangle2_V82JKE5.svg"], ["question-resources/RATriangle3_cVqd6sf.svg", "/srv/numbas/media/question-resources/RATriangle3_cVqd6sf.svg"], ["question-resources/RATriangle4_03OZUzG.svg", "/srv/numbas/media/question-resources/RATriangle4_03OZUzG.svg"], ["question-resources/AcuteTriangle_tSonQMW.svg", "/srv/numbas/media/question-resources/AcuteTriangle_tSonQMW.svg"], ["question-resources/ObtuseTriangle_Fe8ESh4.svg", "/srv/numbas/media/question-resources/ObtuseTriangle_Fe8ESh4.svg"], ["question-resources/radial_survey_1.png", "/srv/numbas/media/question-resources/radial_survey_1.png"], ["question-resources/radial_survey_2.png", "/srv/numbas/media/question-resources/radial_survey_2.png"], ["question-resources/radial_survey_3.png", "/srv/numbas/media/question-resources/radial_survey_3.png"], ["question-resources/radial_survey_4.png", "/srv/numbas/media/question-resources/radial_survey_4.png"], ["question-resources/radial_survey_5.png", "/srv/numbas/media/question-resources/radial_survey_5.png"], ["question-resources/angleofdepression_problem.svg", "/srv/numbas/media/question-resources/angleofdepression_problem.svg"], ["question-resources/ramp_problem_jGRPkmC.png", "/srv/numbas/media/question-resources/ramp_problem_jGRPkmC.png"], ["question-resources/park.png", "/srv/numbas/media/question-resources/park.png"]]}