// Numbas version: exam_results_page_options {"name": "Merryn's copy of Rectangle Area and Perimeter Challenge problems", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Merryn's copy of Rectangle Area and Perimeter Challenge problems", "tags": [], "metadata": {"description": "

Area and Perimeter of Rectangles

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Give answers correct to 2 decimal places

", "advice": "

(a)

\n

Area = width $\\times$ length 

\n

width = $\\frac{\\text{area}}{\\text{length} } =\\frac{\\var{area1}}{\\var{h1} } = \\var{w1}$

\n

Perimeter = $2 \\times$ width $+ 2 \\times$ length$ =2 \\times \\var{w1} + 2 \\times \\var{h1} = \\var{p1}$m

\n

(b)

\n

Perimeter = $2 \\times$ width $+ 2 \\times$ length

\n

Therefore;

\n

width = $\\frac{\\text{perimeter} - 2 \\times \\text{length}}{2}$

\n

width = $\\frac{(\\var{p} - 2 \\times \\var{h})}{2} = \\var{w}$m

\n

\n

Formula for area of rectangle:

\n

Area = width $\\times$ length = $\\var{w} \\times \\var{h} = \\var{a}$m$^2$

\n

\n

\n

\n

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"h1": {"name": "h1", "group": "Ungrouped variables", "definition": "random(20..26 except h)", "description": "", "templateType": "anything", "can_override": false}, "p1": {"name": "p1", "group": "Ungrouped variables", "definition": "2*h1+2*w1", "description": "", "templateType": "anything", "can_override": false}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "\"x\"", "description": "", "templateType": "anything", "can_override": false}, "w1": {"name": "w1", "group": "Ungrouped variables", "definition": "random(5..h-6#0.1)", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "2*h+2*w", "description": "", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Ungrouped variables", "definition": "random(15..34)", "description": "", "templateType": "anything", "can_override": false}, "area1": {"name": "area1", "group": "Ungrouped variables", "definition": "h1*w1", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "h*w", "description": "", "templateType": "anything", "can_override": false}, "w": {"name": "w", "group": "Ungrouped variables", "definition": "random(5..h-6#0.1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["p", "w", "h", "x", "a", "p1", "w1", "h1", "area1"], "variable_groups": [], "functions": {"rectangle": {"parameters": [["h", "number"], ["w", "number"]], "type": "html", "language": "javascript", "definition": "\n\n var c = document.createElement('canvas');\n $(c).attr('width',w+400).attr('height',h+400);\n var context = c.getContext('2d');\n \n //fill in rectangle with a light shade\n context.fillStyle = '#eee';\n context.fillRect(50,50,w*10,h*10);\n \n //draw outline\n context.strokeStyle = '#000';\n context.lineWidth = 3;\n context.strokeRect(50,50,w*10,h*10);\n \n //draw labels\n context.fillStyle = '#000';\n context.font = '20px sans-serif';\n var wstring = 'x'+'m';\n var tw = context.measureText(wstring).width;\n// console.log(tw);\n context.fillText(wstring,60,38);\n \n var hstring = h+'m';\n var hw = context.measureText(hstring).width;\n context.save();\n context.translate(30,200);\n context.rotate(-Math.PI/2);\n context.fillText(hstring,0,0);\n \n return c;\n "}}, "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": "

{rectangle(h1,w1)}

\n

A rectangle has an area of $\\var{area1}$m$^2$ and a length of $\\var{h1}$m. Calculate its width and then its perimeter.

\n

Width = [[0]]m

\n

Perimeter = [[1]]m

\n

", "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": "{w1}", "maxValue": "{w1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "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": "{p1}", "maxValue": "{p1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "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}, {"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": "

{rectangle(h,w)}

\n

A rectangle has a perimeter of $\\var{p}$m. If the length is $\\var{h}$m, first calculate its width and then its area. 

\n

Width = [[0]]m

\n

Area = [[1]]m$^2$

", "stepsPenalty": 0, "steps": [{"type": "information", "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": "

Write down a formula for the perimeter. Now rearrange this to solve for the width.

\n

Then calculate the area.

"}], "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": "{w}", "maxValue": "{w}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "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": "{a}", "maxValue": "{a}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "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", "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/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "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/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}