// Numbas version: finer_feedback_settings {"name": "GA8 Pythagoras - rectangle", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "GA8 Pythagoras - rectangle", "tags": [], "metadata": {"description": "
Find the diagonal or one side of a rectangle using Pythagoras' theorem.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "What is the height of the rectangle below (all measurements given in $cm$)? Please give your answer to one decimal place.
\n{geogebra_applet('https://www.geogebra.org/m/jk3n6sxh',[base: base, hyp: hyp])}
", "advice": "You can see that the rectangle contains a right-angled triangle. We also have the lengths of the base and the hypoteneuse of the triangle. This means we can use Pythagoras' theorem to calculate the last remaining side of the triangle which is also the height of the rectangle.
\n\\[ \\begin{split} Height &\\, = \\sqrt{hypoteneuse^2 - base^2} \\\\ &\\, = \\sqrt{\\var{hyp}^2-\\var{base}^2} \\\\ &\\, = \\sqrt{\\var{{hyp}^2}-\\var{{base}^2}} \\\\ &\\, = \\sqrt{\\var{{{hyp}^2}-{{base}^2}}}\\\\ &\\, = \\var{ans}\\\\ &\\, = \\var{ansr} \\text{ to 1 d.p.} \\end{split} \\]
\nUse this link to find resources to help you revise Pythagoras' theorem.
", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"hyp": {"name": "hyp", "group": "Ungrouped variables", "definition": "random(10 .. 15#1)", "description": "", "templateType": "randrange", "can_override": false}, "base": {"name": "base", "group": "Ungrouped variables", "definition": "random(3 .. 8#1)", "description": "", "templateType": "randrange", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "sqrt(hyp^2-base^2)", "description": "", "templateType": "anything", "can_override": false}, "ansr": {"name": "ansr", "group": "Ungrouped variables", "definition": "precround(ans,1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["hyp", "base", "ans", "ansr"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Answer", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "[[0]]$cm$ (give your answer to 1 d.p.)
", "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": "ans", "maxValue": "ans", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "1", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Will Morgan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21933/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}]}]}], "contributors": [{"name": "Will Morgan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21933/"}, {"name": "Megan Oliver", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23526/"}]}