// Numbas version: exam_results_page_options {"name": "Design Safety", "extensions": [], "custom_part_types": [{"source": {"pk": 1, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/1/edit"}, "name": "Yes/no", "short_name": "yes-no", "description": "

The student is shown two radio choices: \"Yes\" and \"No\". One of them is correct.

", "help_url": "", "input_widget": "radios", "input_options": {"correctAnswer": "if(eval(settings[\"correct_answer_expr\"]), 0, 1)", "hint": {"static": true, "value": ""}, "choices": {"static": true, "value": ["Yes", "No"]}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nif(studentanswer=correct_answer,\n correct(),\n incorrect()\n)\n\ninterpreted_answer:\nstudentAnswer=0\n\ncorrect_answer:\nif(eval(settings[\"correct_answer_expr\"]),0,1)", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=correct_answer,\n correct(),\n incorrect()\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer=0"}, {"name": "correct_answer", "description": "", "definition": "if(eval(settings[\"correct_answer_expr\"]),0,1)"}], "settings": [{"name": "correct_answer_expr", "label": "Is the answer \"Yes\"?", "help_url": "", "hint": "An expression which evaluates to true or false.", "input_type": "mathematical_expression", "default_value": "true", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Design Safety", "tags": [], "metadata": {"description": "

Question requires students to determine if the largest angle of a triangle is smaller than a given value. Answer is Yes/No but students need to use cosine rule to find the largest angle and to know that largest angle is opposite longest side (otherwise they will need to find all angles of the triangle). Designed for a test where students upload handwritten working for each question as a check against guessing. Also designed to make it difficult for students to google or use AI to find the answer.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "

Note that the largest angle in a triange is always opposite the longest side of the triangle.

\n

Letting the longest side be \\(a\\), and the largest angle correspondingly \\(A\\) we have that \\(a=\\var{long}\\) m and, by the cosine rule \\[\\cos A=\\frac{b^2+c^2-a^2}{2bc}\\] where \\(b\\) and \\(c\\) are the lengths of the other two sides of the triangle.

\n

Thus

\n

\\begin{align}\\cos A&=\\frac{b^2+c^2-a^2}{2bc}\\\\&=\\frac{\\var{side2}^2+\\var{side3}^2-\\var{long}^2}{2\\times\\var{side2}\\times\\var{side3}}\\\\&=\\frac{\\var{side2^2}+\\var{side3^2}-\\var{long^2}}{\\var{2*side2*side3}}\\\\&\\approx\\var{cos_a}\\end{align}

\n

giving \\begin{align}A&=\\cos^{-1}\\left(\\var{cos_a}\\right)\\\\&\\approx\\var{ precround(angle,1)}^\\circ\\end{align}

\n

Hence the structure is safe.

\n

Hence the structure is not safe.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"long": {"name": "long", "group": "Ungrouped variables", "definition": "random(3..5 #0.1)", "description": "

Length of longest side of triangle

", "templateType": "anything", "can_override": false}, "side2": {"name": "side2", "group": "Ungrouped variables", "definition": "random(1..long-0.1 #0.1)", "description": "

length of second side of triangle - random but set to be less than longest side

", "templateType": "anything", "can_override": false}, "side3": {"name": "side3", "group": "Ungrouped variables", "definition": "random(long-side2+0.1..long-0.1 #0.1 except side2)", "description": "

length of third side of triangle, random but set to be between length of longest side and side2.

", "templateType": "anything", "can_override": false}, "sides": {"name": "sides", "group": "Ungrouped variables", "definition": "shuffle([long, side2, side3])", "description": "

lengths of sides of traingles in shuffled order to ensure that the longest side can appear as any of the specified sides in the question.

", "templateType": "anything", "can_override": false}, "angle": {"name": "angle", "group": "Ungrouped variables", "definition": "arccos((side2^2+side3^2-long^2)/(2*side2*side3))*180/pi", "description": "

largest angle of the triangle in degrees

", "templateType": "anything", "can_override": false}, "cos_a": {"name": "cos_a", "group": "Ungrouped variables", "definition": "precround((side2^2+side3^2-long^2)/(2*side2*side3),4)", "description": "

cosine of largest angle. used in Advice only.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["long", "side2", "side3", "sides", "angle", "cos_a"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "yes-no", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

A building design requires a triangular support structure as part of its design. The plans show this structure as having sides of length \\(\\var{sides[0]}\\) m, \\(\\var{sides[1]}\\) m and \\(\\var{sides[2]}\\) m. Analysis of the design shows that the structure will be unsafe if the largest angle of the triangle is more than \\(125^\\circ\\).

\n

Is the structure as designed safe? (Full working to justify your answer must be shown on your handwritten working)

", "settings": {"correct_answer_expr": "angle<125"}}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}