// Numbas version: finer_feedback_settings {"name": "Simon's copy of Q3 Triangle problems", "extensions": [], "custom_part_types": [], "resources": [["question-resources/area-of-a-equilateral-triangle-formula.png", "/srv/numbas/media/question-resources/area-of-a-equilateral-triangle-formula.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "
(a)
\nUse the formula for area of a triangle in terms of perpendicular height, $h$ and base, $b$
\nArea = $\\frac{1}{2} \\times b \\times h$
\nIn this case
\n$\\var{area2} = \\frac{1}{2} \\times \\var{lent2} \\times h$
\nSo $h = 2 \\times \\frac{\\var{area2}}{\\var{lent2}} = \\var{precround(ans2,2)}$m
\n\n
(b)
\nUsing the given formula $A =\\frac{\\sqrt{3}}{4} a^2 = \\frac{\\sqrt3}{4} \\times \\var{side1}^2= \\var{precround(ans1,2)}$m$^2$
\n\n
\n
An alternative method uses the area of triangle formula $A = \\frac{1}{2}$ab $\\sin(c)$ = $\\frac{1}{2} \\times \\var{side1} \\times \\var{side1} \\times \\sin(60) = \\var{precround(ans1,2)}$m$^2$
\n\n", "variables": {"ans1": {"name": "ans1", "definition": "(sqrt(3)/4)*side1^2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "lent2": {"name": "lent2", "definition": "random(7..12#0.5)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "ans2": {"name": "ans2", "definition": "(2*area2)/lent2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "area2": {"name": "area2", "definition": "random(60..70#0.1)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "side1": {"name": "side1", "definition": "random(12..16#0.25)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}}, "variable_groups": [], "ungrouped_variables": ["side1", "ans1", "lent2", "area2", "ans2"], "preamble": {"css": "", "js": ""}, "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "name": "Simon's copy of Q3 Triangle problems", "statement": "Give answers correct to 2 decimal places
", "metadata": {"description": "Areas of triangles
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "functions": {"tri": {"parameters": [["h", "number"]], "language": "javascript", "type": "html", "definition": " var c = document.createElement('canvas');\n $(c).attr('width',200).attr('height',200);\n var context = c.getContext('2d');\n \nvar height = 100 * (Math.sqrt(3)/2);\nvar XX = 100\nvar YY = 100\n\n// the triangle\ncontext.beginPath();\ncontext.moveTo(100, 100);\ncontext.lineTo(XX+50, YY+height);\ncontext.lineTo(XX-50, YY+height);\ncontext.closePath();\n \n// the outline\ncontext.lineWidth = 10;\ncontext.strokeStyle = '#666666';\ncontext.stroke();\n \n// the fill color\ncontext.fillStyle = \"#FFCC00\";\ncontext.fill();\n\n return c;\n "}, "tri1": {"parameters": [["a", "number"]], "language": "javascript", "type": "html", "definition": " var c = document.createElement('canvas');\n $(c).attr('width',500).attr('height',500);\n var context = c.getContext('2d');\n \nvar height = 100 * (Math.sqrt(3)/2);\nvar XX = 200\nvar YY = 200\n\n// the triangle\ncontext.beginPath();\ncontext.moveTo(100, 100);\ncontext.lineTo(XX+50, YY+height);\ncontext.lineTo(XX-50, YY+height);\ncontext.closePath();\n \n// the outline\ncontext.lineWidth = 10;\ncontext.strokeStyle = '#666666';\ncontext.stroke();\n \n// the fill color\ncontext.fillStyle = \"#FFCC00\";\ncontext.fill();\n\n return c;\n "}}, "extensions": [], "parts": [{"showCorrectAnswer": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "type": "gapfill", "variableReplacements": [], "scripts": {}, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "sortAnswers": false, "prompt": "Calculate the perpendicular height of a triangle whose base length is $\\var{lent2}$m, if the area of this triangle is $\\var{area2}$m$^2$
\n[[0]]m
\n", "marks": 0, "gaps": [{"mustBeReduced": false, "unitTests": [], "minValue": "{ans2}", "customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "maxValue": "{ans2}", "marks": 1, "showPrecisionHint": false, "allowFractions": false, "showCorrectAnswer": true, "strictPrecision": false, "variableReplacementStrategy": "originalfirst", "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "mustBeReducedPC": 0, "type": "numberentry", "variableReplacements": [], "correctAnswerFraction": false, "scripts": {}, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "precision": "2", "precisionType": "dp", "precisionPartialCredit": 0}]}, {"showCorrectAnswer": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "type": "gapfill", "variableReplacements": [], "scripts": {}, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "sortAnswers": false, "prompt": "The area of an equilateral triangle with side length $a$ is given by $A =\\frac{\\sqrt{3}}{4} a^2$
\nHence find the area of an equilateral triangle which has a side of $\\var{side1}$m.
\n{tri(side1)}
\n[[0]]m$^2$
", "marks": 0, "gaps": [{"mustBeReduced": false, "unitTests": [], "minValue": "{ans1}", "customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "maxValue": "{ans1}", "marks": 1, "showPrecisionHint": false, "allowFractions": false, "showCorrectAnswer": true, "strictPrecision": false, "variableReplacementStrategy": "originalfirst", "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "mustBeReducedPC": 0, "type": "numberentry", "variableReplacements": [], "correctAnswerFraction": false, "scripts": {}, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "precision": "2", "precisionType": "dp", "precisionPartialCredit": 0}]}], "type": "question", "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}