// Numbas version: exam_results_page_options {"name": "MATH6052 - Short Test 4", "metadata": {"description": "", "licence": "None specified"}, "duration": 1500, "percentPass": "40", "showQuestionGroupNames": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-shuffled", "pickQuestions": 1, "questions": [{"name": "Chain Base Index", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "functions": {}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "thing"], "tags": ["cr1", "data analysis", "fitted value", "rebelmaths", "regression", "residual value", "sc", "statistics"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": 0, "prompt": "
For the years 2008 to 2013 calculate a chain base index for the {thing[0]}. (round answers to nearest whole number)
\nYear | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 |
---|---|---|---|---|---|---|
\n The {thing[0]} \nIndex Number \n | \n- | \n[[0]] | \n[[1]] | \n[[2]] | \n[[3]] | \n[[4]] | \n
Click on Show steps if you want more information. You will not lose any marks by doing so.
\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "
To calculate the index number for a particular year use the following formula
\n$\\frac{\\text{Value for the year}}{\\text{Value for the previous year}}\\times 100$
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "{b}/{a}*100", "strictPrecision": true, "minValue": "{b}/{a}*100", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": 0, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "{c}/{b}*100", "strictPrecision": true, "minValue": "{c}/{b}*100", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": 0, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "{d}/{c}*100", "strictPrecision": true, "minValue": "{d}/{c}*100", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": 0, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "{f}/{d}*100", "strictPrecision": true, "minValue": "{f}/{d}*100", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": 0, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "{g}/{f}*100", "strictPrecision": true, "minValue": "{g}/{f}*100", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": 0, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "The table below shows the frequency distribution for {thing[0]}.
\nYear | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 |
---|---|---|---|---|---|---|
{thing[0]} | \n{a} | \n{b} | \n{c} | \n{d} | \n{f} | \n{g} | \n
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "Random(485..550)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "Random(500..600)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "Random(500..600)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "Random(550..600)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "g": {"definition": "Random(600..650)", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}, "f": {"definition": "Random(600..650)", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "thing": {"definition": "random(['average monthly rent ', 'for residents of a town'],['average weekly salary','for employees of a company'])", "templateType": "anything", "group": "Ungrouped variables", "name": "thing", "description": ""}}, "metadata": {"description": "
Chain Base Index Numbers
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Simple interest", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "metadata": {"description": "Calculate the interest accrued in a savings account, given the initial balance and annual interest rate.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Suppose you put £{money} into a savings account exactly {years} years ago and you haven't touched the money since. The simple interest rate on the account is {perc2}% per year.
", "variables": {"perc2": {"name": "perc2", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(0..2.5 #0.05)"}, "money": {"name": "money", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(100..5000 #100)"}, "years": {"name": "years", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(2..6)"}}, "tags": ["interests", "percentages", "taxonomy"], "ungrouped_variables": ["perc2", "money", "years"], "functions": {}, "preamble": {"js": "", "css": ""}, "advice": "This is simple interest, which means the amount added each year is a percentage of the original amount. The amount we add is fixed for all {years} years.
\nFirst, we work out the amount of interest for one year:
\n\\begin{align}
\\var{perc2} \\text{% of } \\var{money} &= \\frac{\\var{perc2}}{100} \\times \\var{money} \\\\
&= \\var{perc2/100} \\times \\var{money} \\\\
&= £\\var{dpformat(perc2/100*money,2)} \\text{.}
\\end{align}
The money has been in the account for {years} years, so we multiply $£\\var{dpformat(perc2/100*money,2)}$ by $\\var{years}$.
\n\\[ £\\var{dpformat(perc2/100*money,2)} \\times \\var{years} = £\\var{dpformat(perc2/100*money*years,2)} \\text{.} \\]
\nAdding this to the original balance:
\n\\[ £\\var{money} + £\\var{dpformat(perc2/100*money*years,2)} = £\\var{dpformat(perc2/100*money*years + money,2)} \\text{.} \\]
\nThis is the amount we would get if we withdrew the whole savings balance today.
", "type": "question", "variable_groups": [], "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"scripts": {}, "showCorrectAnswer": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "precision": "2", "variableReplacements": [], "mustBeReducedPC": 0, "precisionPartialCredit": 0, "minValue": "(1 + perc2/100*years)*money", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "precisionType": "dp", "scripts": {}, "maxValue": "(1 + perc2/100*years)*money", "showCorrectAnswer": false, "strictPrecision": true, "type": "numberentry", "showPrecisionHint": true, "mustBeReduced": false, "marks": "2", "showFeedbackIcon": true, "precisionMessage": "You have not given your answer to the correct precision."}], "type": "gapfill", "marks": 0, "prompt": "If you were to withdraw the money from this account now, how much would you have?
\n£ [[0]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true}]}, {"name": "Savings compound interest 2 ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "functions": {}, "ungrouped_variables": ["n", "P", "A", "perc", "int", "ratio", "intplus"], "tags": ["rebel", "Rebel", "REBEL", "rebelmaths"], "advice": "The compound interest formula is: $\\ A = P(1+i)^n $
\nPart (a)
\nP represents the principal sum invested , so in this example it is €$\\var{P}$.
\nPart (b)
\nA represents the amount in the deposit account after $\\var{n}$ years, so in this example it is €$\\var{A}$.
\nPart (c)
\nn represents the number of compounding periods , so in this example it is $\\var{n}$ years.
\nPart(d)
\nUsing the compound interest formula:
\n$A=P(1+i)^n$
\n$\\var{A}=\\var{P}(1+i)^\\var{n}$
\nWe need to rearrange the equation to find the value of $i$.
\n$\\frac{\\var{A}}{\\var{P}}=(1+i)^\\var{n}$
\n$\\var{ratio}=(1+i)^\\var{n}$
\n$\\sqrt[\\var{n}]{\\var{ratio}}=1+i$
\n$\\var{intplus}=1+i$
\n$i=\\var{int}$ so the annual interest rate is $\\var{perc}$%.
", "rulesets": {}, "parts": [{"prompt": "What is the value of P?
\n€[[0]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "P+0.0001", "minValue": "P-0.0001", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "What is the value of A?
\n€[[0]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "A+0.0001", "minValue": "A-0.0001", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "What is the value of n?
\n\n
[[0]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "n+0.0001", "minValue": "n-0.0001", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "What is the interest rate per annum?
\nPlease give your answer as a percentage correct to 2 decimal places.
\n\n[[0]]%
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "perc+0.02", "minValue": "perc-0.02", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "3", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "A lump sum of €$\\var{P}$ is deposited into a savings account that pays compound interest for $\\var{n}$ years. If no withdrawals are made from the account, then the amount that the lump sum will have grown to is €$\\var{A}$.
\nThe compound interest formula is:
\n$\\ A = P(1+i)^n $
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"A": {"definition": "precround(P*(1+int)^n,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "A", "description": ""}, "perc": {"definition": "random(1.5..5.5 #0.5)", "templateType": "anything", "group": "Ungrouped variables", "name": "perc", "description": ""}, "ratio": {"definition": "A/P", "templateType": "anything", "group": "Ungrouped variables", "name": "ratio", "description": ""}, "int": {"definition": "perc/100", "templateType": "anything", "group": "Ungrouped variables", "name": "int", "description": ""}, "intplus": {"definition": "ratio^(1/n)", "templateType": "anything", "group": "Ungrouped variables", "name": "intplus", "description": ""}, "n": {"definition": "random(2..6 #1)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "P": {"definition": "random(1000..6000 #500)", "templateType": "anything", "group": "Ungrouped variables", "name": "P", "description": ""}}, "metadata": {"description": "Calculate the annual interest rate for a savings account where A, P and n are given.
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Q1 Calculating weekly Net Tax", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}], "functions": {}, "ungrouped_variables": ["name", "wage", "cut", "credit", "standard", "higher", "ans"], "tags": ["rebelmaths"], "advice": "{standard}% => $\\frac{\\var{standard}}{100}$
\n{higher}% => $\\frac{\\var{higher}}{100}$
\n\nCalculate the gross income tax for the week first as follows:
\nCalculate the standard cut-off point amount first by $\\frac{\\var{standard}}{100} \\times \\var{cut}$
\nThen, the income tax at the higher rate by $\\frac{\\var{higher}}{100} \\times (\\var{wage} - \\var{cut})$
\nFinally, add them to get the gross income tax
\n$(\\frac{\\var{standard}}{100} \\times \\var{cut}) + (\\frac{\\var{higher}}{100} \\times (\\var{wage} - \\var{cut}))$
\n\n
Using the gross income tax calculated in above
\nSubtract the tax credit, $\\var{credit}$, giving the amount of income tax paid.
\n$(\\frac{\\var{standard}}{100} \\times \\var{cut}) + (\\frac{\\var{higher}}{100} \\times (\\var{wage} - \\var{cut})) - \\var{credit} = \\var{ans}$
\n\nLook at this website for worked examples:
\n", "rulesets": {}, "parts": [{"stepsPenalty": 0, "prompt": "Calculate the amount of income tax he pays each week.
\n€[[0]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "precision": "2", "maxValue": "{ans}", "minValue": "{ans}", "variableReplacementStrategy": "originalfirst", "strictPrecision": false, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "steps": [{"prompt": "$\\var{name}$ pays tax at $\\var{standard}$% on the first $\\var{cut}$ of his money, so you need to find $\\var{standard}$% of $\\var{cut}$.
\nHe pays tax at $\\var{higher}$% on everything above $\\var{cut}$, so you need to find out how much he earns above the cut off $\\var{cut}$ and get $\\var{higher}$% of that.
\nAdd the two tax bills together to find the gross tax that $\\var{name}$ owes.
\nSubtract his tax credits from this.
\nThe result is the net tax that he has to pay.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "marks": 0, "scripts": {}, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "$\\var{name}$ has a weekly wage of €$\\var{wage}$. His standard cut-off point is €$\\var{cut}$, and his tax credit is €$\\var{credit}$ per week. The standard rate of income tax is $\\var{standard}$% and the higher rate is $\\var{higher}$%.
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"wage": {"definition": "random(750..950#10)", "templateType": "anything", "group": "Ungrouped variables", "name": "wage", "description": ""}, "cut": {"definition": "random(520..680#5)", "templateType": "anything", "group": "Ungrouped variables", "name": "cut", "description": ""}, "name": {"definition": "random('David','John','Paul','Noel','Steve')", "templateType": "anything", "group": "Ungrouped variables", "name": "name", "description": ""}, "standard": {"definition": "random(20..23)", "templateType": "anything", "group": "Ungrouped variables", "name": "standard", "description": ""}, "credit": {"definition": "random(40..75)", "templateType": "anything", "group": "Ungrouped variables", "name": "credit", "description": ""}, "ans": {"definition": "((({standard}/100)*{cut})+(({higher}/100)*({wage}-{cut})))-{credit}", "templateType": "anything", "group": "Ungrouped variables", "name": "ans", "description": ""}, "higher": {"definition": "random(40..43)", "templateType": "anything", "group": "Ungrouped variables", "name": "higher", "description": ""}}, "metadata": {"description": "Net Tax
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "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}, "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}], "functions": {"tri": {"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 ", "type": "html", "language": "javascript", "parameters": [["h", "number"]]}, "tri1": {"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 ", "type": "html", "language": "javascript", "parameters": [["a", "number"]]}}, "ungrouped_variables": ["side1", "ans1", "lent2", "area2", "ans2"], "tags": ["area", "Area", "area of a triangle", "Area of a triangle", "canvas", "function", "graphic", "rebelmaths", "triangle", "Triangle"], "preamble": {"css": "", "js": ""}, "advice": "Part1
\n\nwhere a=length of side
\n$\\frac{\\sqrt3}{4} \\times \\var{side1}^2= \\var{ans1}m^2$
\nOr another method is:
\nA = $\\frac{1}{2}$ab $\\sin(c)$ = $\\frac{1}{2} \\times \\var{side1} \\times \\var{side1} \\times \\sin(60) = \\var{ans1}m^2$
\n\nFormula for perpendicular height of triangle.
\nArea = $\\frac{1}{2} \\times $base$ \\times$ perpendicular height
\n$2 \\times \\frac{\\var{area2}}{\\var{lent2}} = \\var{ans2}m$
", "rulesets": {}, "parts": [{"prompt": "Find the area of an equilateral triangle which has a side of $\\var{side1}$m.
\n{tri(side1)}
\n[[0]]$m^2$
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "{ans1}", "strictPrecision": false, "minValue": "{ans1}", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"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{tri1(lent2)}
\n[[0]]$m$
\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "{ans2}", "strictPrecision": false, "minValue": "{ans2}", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "Correct to 2 decimal place
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"ans1": {"definition": "(sqrt(3)/4)*side1^2", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "ans2": {"definition": "(2*area2)/lent2", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "description": ""}, "lent2": {"definition": "random(7..12#0.5)", "templateType": "anything", "group": "Ungrouped variables", "name": "lent2", "description": ""}, "area2": {"definition": "random(60..70#0.1)", "templateType": "anything", "group": "Ungrouped variables", "name": "area2", "description": ""}, "side1": {"definition": "random(12..16#0.25)", "templateType": "anything", "group": "Ungrouped variables", "name": "side1", "description": ""}}, "metadata": {"description": "Areas of triangles
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Q2 Rectangle problems", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}], "functions": {"rectangle": {"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 ", "type": "html", "language": "javascript", "parameters": [["h", "number"], ["w", "number"]]}}, "ungrouped_variables": ["p", "w", "h", "x", "a", "p1", "w1", "h1", "area1"], "tags": ["Area", "area", "canvas", "function", "graphic", "Perimeter", "perimeter", "rebelmaths", "rectangle", "Rectangle"], "preamble": {"css": "", "js": ""}, "advice": "Part 1
\nFormula for perimeter of rectangle.
\nPerimeter = $2 \\times$ width $+ 2 \\times$ length
\nTherefore;
\nwidth = $\\frac{(\\text{perimter} - 2 \\times length)}{2}$
\n$\\frac{(\\var{p} - 2 \\times \\var{h})}{2} = \\var{w}m$
\nFormula for area of rectangle.
\nArea = width $\\times$ length
\n$\\var{w} \\times \\var{h} = \\var{a}m^2$
\n\nPart 2
\nFormula for area of rectangle.
\nArea = width $\\times$ length
\n$\\frac{\\var{area1}}{\\var{h1} } = \\var{w1}$
\nPerimeter = $2 \\times$ width $+ 2 \\times$ length
\n$2 \\times \\var{w1} + 2 \\times \\var{h1} = \\var{p1}m$
\n\n", "rulesets": {}, "parts": [{"stepsPenalty": 0, "prompt": "{rectangle(h,w)}
\nA rectangle has a perimeter of $\\var{p}m$. If the length is $\\var{h}m$, first calculate its width and then its area.
\nwidth = [[0]]m
\narea = [[1]]$m^2$
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "First write the perimeter in terms of x.
\nSolve for x.
\nThen calculate the area.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "{w}", "strictPrecision": false, "minValue": "{w}", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "{a}", "strictPrecision": false, "minValue": "{a}", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"stepsPenalty": 0, "prompt": "{rectangle(h1,w1)}
\nCalculate the perimeter of a rectangle which has a length of $\\var{h1}m$, if the area of this rectangle is $\\var{area1}m^2$. First calculate its width.
\nwidth = [[0]]m
\nperimeter = [[1]]$m$
\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "First write the areain terms of x.
\nNext, find the length of side x.
\nThen find the perimeter.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "{w1}", "strictPrecision": false, "minValue": "{w1}", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "{p1}", "strictPrecision": false, "minValue": "{p1}", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "Correct to 2 decimal places
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "h*w", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "p1": {"definition": "2*h1+2*w1", "templateType": "anything", "group": "Ungrouped variables", "name": "p1", "description": ""}, "w": {"definition": "random(5..h-6#0.1)", "templateType": "anything", "group": "Ungrouped variables", "name": "w", "description": ""}, "h": {"definition": "random(15..34)", "templateType": "anything", "group": "Ungrouped variables", "name": "h", "description": ""}, "h1": {"definition": "random(20..26 except h)", "templateType": "anything", "group": "Ungrouped variables", "name": "h1", "description": ""}, "p": {"definition": "2*h+2*w", "templateType": "anything", "group": "Ungrouped variables", "name": "p", "description": ""}, "w1": {"definition": "random(5..h-6#0.1)", "templateType": "anything", "group": "Ungrouped variables", "name": "w1", "description": ""}, "x": {"definition": "\"x\"", "templateType": "anything", "group": "Ungrouped variables", "name": "x", "description": ""}, "area1": {"definition": "h1*w1", "templateType": "anything", "group": "Ungrouped variables", "name": "area1", "description": ""}}, "metadata": {"description": "Area and Perimeter of Rectangles
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}]}], "navigation": {"allowregen": false, "reverse": true, "browse": true, "allowsteps": false, "showfrontpage": true, "showresultspage": "oncompletion", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": false, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "warn", "message": "You have 5 minutes remaining, please ensure that all work is submitted before the time runs out.
"}}, "feedback": {"showactualmark": false, "showtotalmark": false, "showanswerstate": false, "allowrevealanswer": false, "advicethreshold": 0, "intro": "Please have the formulae and table booklet open in a separate tab on your computer before you begin, you will find this under Course Notes on the MATH6052 Home page on Canvas.
", "feedbackmessages": []}, "contributors": [{"name": "Katie Bullen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2255/"}], "extensions": ["stats"], "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"]]}