// Numbas version: exam_results_page_options {"allQuestions": true, "percentPass": 0, "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "preventleave": true, "allowregen": true, "browse": true, "showresultspage": "never", "showfrontpage": true}, "timing": {"timeout": {"action": "none", "message": ""}, "allowPause": true, "timedwarning": {"action": "none", "message": ""}}, "name": "Don't give any feedback!", "metadata": {"notes": "
We don't recommend it, but a few people have asked for these settings for summative exams.
\nWe've turned off \"show results page\" in the Navigation tab, and all the options in the Feedback tab.
", "licence": "Creative Commons Attribution 4.0 International", "description": "This exam turns off all the feedback options, so students know nothing about how they've done.
"}, "type": "exam", "showQuestionGroupNames": false, "shuffleQuestions": false, "questions": [], "duration": 0, "pickQuestions": 0, "question_groups": [{"name": "", "questions": [{"name": "Numerical reasoning - ratio recipe", "extensions": ["stats"], "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/"}], "functions": {"describesol": {"definition": "if(ratios[j]=1,\"$U$ is not more than $\"+u[j]+\"$.\",\"$\"+ratios[j]+\"$ is not more than $\"+u[j]+\"$, i.e. $U$ is not more than $\"+(u[j]/ratios[j])+\"$.\")", "type": "string", "language": "jme", "parameters": [["j", "number"]]}}, "tags": ["chain rule", "proportion", "ratio"], "type": "question", "advice": "The proportions {ratios[0]}:{ratios[1]}:{ratios[2]} have to be preserved.
\nSo if we use $\\simplify{{ratios[0]}*U}$ {units} of $x$ then we must use $\\simplify{{ratios[1]}*U}$ {units} of $y$ and $\\simplify{{ratios[2]}*U}$ {units} of $z$, to get $\\var{ratiototal}U$ {units} of the preparation.
\nWe would like $U$ to be as big as possible.
\nAs we have $\\var{u[0]}$ {units} of $x$, {describesol(0)}
\nAs we have $\\var{u[1]}$ {units} of $y$, {describesol(1)}
\nAs we have $\\var{u[2]}$ {units} of $z$, {describesol(2)}
\nSo the maximum value of $U$ is $\\var{lots}$ and we can make $\\var{lots} \\times \\var{ratiototal} = \\var{amount}$ {units} of the preparation.
", "rulesets": {}, "parts": [{"prompt": "How many {units} of the preparation can be made from a stock of materials consisting of {u[0]} {units} of $x$, {u[1]} {units} of $y$, and {u[2]} {units} of $z$?
\n[[0]] {units}
", "marks": 0, "gaps": [{"marks": 1, "maxValue": "amount", "minValue": "amount", "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "A certain preparation consists of liquids $x$, $y$ and $z$ in the proportion {ratios[0]}:{ratios[1]}:{ratios[2]}.
", "variable_groups": [], "progress": "ready", "preamble": {"css": "", "js": ""}, "variables": {"rv": {"definition": "vector(ratios)", "templateType": "anything", "group": "Ungrouped variables", "name": "rv", "description": ""}, "rawratios": {"definition": "shuffle([random(1..7 except 3),random(1..7 except 3),3])", "templateType": "anything", "group": "Ungrouped variables", "name": "rawratios", "description": ""}, "lots": {"definition": "floor(min(map(u[j]/ratios[j],j,0..2)\t))", "templateType": "anything", "group": "Ungrouped variables", "name": "lots", "description": ""}, "uv": {"definition": "vector(u)", "templateType": "anything", "group": "Ungrouped variables", "name": "uv", "description": ""}, "rgcd": {"definition": "gcd(gcd(rawratios[0],rawratios[1]),rawratios[2])", "templateType": "anything", "group": "Ungrouped variables", "name": "rgcd", "description": ""}, "amount": {"definition": "lots*ratiototal", "templateType": "anything", "group": "Ungrouped variables", "name": "amount", "description": ""}, "u": {"definition": "//amount of each liquid\n map(random(3..10)*ratios[j],j,0..2)", "templateType": "anything", "group": "Ungrouped variables", "name": "u", "description": ""}, "ratios": {"definition": "map(rawratios[j]/rgcd,j,0..2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ratios", "description": ""}, "units": {"definition": "random('litres','gallons','millilitres')", "templateType": "anything", "group": "Ungrouped variables", "name": "units", "description": ""}, "ratiototal": {"definition": "sum(ratios)", "templateType": "anything", "group": "Ungrouped variables", "name": "ratiototal", "description": ""}}, "metadata": {"notes": "", "description": "Given ratio of ingredients in a preparation, and amounts of each ingredient, work out how much of the preparation you can make.
\nBased on question 5 from section 3 of the maths-aid workbook on numerical reasoning.
", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Numerical reasoning - prices in ratios", "extensions": ["stats"], "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/"}], "functions": {"describefraction": {"definition": "//put fraction into words\n \n numbers = ['zero','one','two','three','four','five','six','seven','eight','nine','ten'];\n denominators = ['','','half','third','quarter','fifth','sixth','seventh','eighth','ninth','tenth'];\n \n var gcd = Numbas.math.gcf(n,d);\n n /= gcd;\n d /= gcd;\n \n if(n%d==0) {\n var t = n/d;\n switch(t) {\n case 1:\n return 'the same as';\n case 2:\n return 'twice as much as';\n default:\n return numbers[t]+' times as much as';\n }\n }\n else if(n>d) {\n var t = (n-(n%d))/d;\n var m = n%d;\n if(m==1)\n return numbers[t]+'-and-a-'+denominators[d]+' times as much as';\n else\n return numbers[t]+'-and-'+numbers[m]+'-'+denominators[d]+(m>1?'s':'')+' times as much as';\n }\n else if(d==2) {\n return 'half as much as';\n }\n else {\n return numbers[n]+'-'+denominators[d]+(n>1?'s':'')+' as much as';\n }", "type": "string", "language": "javascript", "parameters": [["n", "number"], ["d", "number"]]}, "pluralise": {"definition": "return Numbas.util.pluralise(n,singular,plural);", "type": "string", "language": "javascript", "parameters": [["n", "number"], ["singular", "string"], ["plural", "string"]]}, "capitalise": {"definition": "return Numbas.util.capitalise(s);", "type": "string", "language": "javascript", "parameters": [["s", "string"]]}}, "tags": ["constraints", "numerical reasoning", "ratio", "simultaneous equations"], "advice": "Here are two solutions. The first uses the idea of shares and the second uses algebra.
\nWe are given that the cost of \\[ \\var{ratio[dirs[1]]/gcd(ratio[dirs[0]],ratio[dirs[1]])} \\times \\var{ops[dirs[0]]} = \\var{ratio[dirs[0]]/gcd(ratio[dirs[0]],ratio[dirs[1]])} \\times \\var{ops[dirs[1]]} \\] and \\[ \\var{ratio[dirs[2]]/gcd(ratio[dirs[1]],ratio[dirs[2]])} \\times \\var{ops[dirs[1]]} = \\var{ratio[dirs[1]]/gcd(ratio[dirs[1]],ratio[dirs[2]])} \\times \\var{ops[dirs[2]]}. \\]
\nWe can represent the ratios of the costs for {ops[dirs[0]]}, {ops[dirs[1]]} and {ops[dirs[2]]} by giving cost shares to each of the repairs in the ratios {ratio[dirs[0]]}:{ratio[dirs[1]]}:{ratio[dirs[2]]}.
\nThat is, give {ops[dirs[0]]} {ratio[dirs[0]]} {pluralise(ratio[dirs[0]],'share','shares')}, {ops[dirs[1]]} {ratio[dirs[1]]} {pluralise(ratio[dirs[1]],'share','shares')} and {ops[dirs[2]]} {ratio[dirs[2]]} {pluralise(ratio[dirs[2]],'share','shares')}. Then the relative costs are preserved.
\nHence there are $\\var{ratio[dirs[0]]}+\\var{ratio[dirs[1]]}+\\var{ratio[dirs[2]]} = \\var{ratiototal}$ shares to add up to £{total}.
\nSo each share is worth $\\var{total} \\div \\var{ratiototal} = £\\var{factor}$ and {ops[wanted]} gets {ratio[wanted]} {pluralise(ratio[wanted],'share','shares')} i.e. costs £{prices[wanted]}.
\nLet $\\var{letters[0]}$ = {ops[0]}, $\\var{letters[1]}$ = {ops[1]}, $\\var{letters[2]}$ = {ops[2]}.
\nWe are given that $\\var{letters[dirs[0]]} = \\simplify{{ratio[dirs[0]]}/{ratio[dirs[1]]}} \\var{letters[dirs[1]]}$, and $\\var{letters[dirs[1]]} = \\simplify{{ratio[dirs[1]]}/{ratio[dirs[2]]}} \\var{letters[dirs[2]]}$.
\nRearrange the second equation to give $\\var{letters[dirs[2]]}$ in terms of $\\var{letters[dirs[1]]}$:
\n\\[ \\var{letters[dirs[2]]} = \\simplify{{ratio[dirs[2]]}/{ratio[dirs[1]]}} \\var{letters[dirs[1]]} \\]
\nSo \\[ \\begin{eqnarray} \\textrm{total cost of repair work} &=& \\var{letters[dirs[0]]} + \\var{letters[dirs[1]]} + \\var{letters[dirs[2]]} \\\\ &=& \\simplify{{ratio[dirs[0]]}/{ratio[dirs[1]]}} \\var{letters[dirs[1]]} + \\var{letters[dirs[1]]} + \\simplify{{ratio[dirs[2]]}/{ratio[dirs[1]]}} \\var{letters[dirs[1]]} \\\\ &=& \\left( \\simplify{{ratio[dirs[0]]}/{ratio[dirs[1]]}} + 1 + \\simplify{{ratio[dirs[2]]}/{ratio[dirs[1]]}} \\right) \\var{letters[dirs[1]]} \\\\ &=& \\simplify{{ratiototal}/{ratio[dirs[1]]}} \\var{letters[dirs[1]]}. \\end{eqnarray} \\]
\nHence $\\simplify{{ratiototal}/{ratio[dirs[1]]}} \\var{letters[dirs[1]]} = £\\var{total}$ gives us $\\var{letters[dirs[1]]} = \\simplify{{ratio[dirs[1]]}/{ratiototal}} \\times £\\var{total} = £\\var{prices[dirs[1]]}$.
\nSo the cost of {ops[wanted]} was £{prices[wanted]}.
", "rulesets": {}, "parts": [{"prompt": "What did {ops[wanted]} cost?
\n£ [[0]]
", "gaps": [{"minvalue": "{prices[wanted]}", "type": "numberentry", "maxvalue": "{prices[wanted]}", "marks": 1.0, "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}], "statement": "The total cost for three items of work on a {car} was £{total}.
\nThese items were: {ops[0]}, {ops[1]} and {ops[2]}.
\n{capitalise(ops[dir1[0]])} costs {describefraction(ratio[dir1[0]],ratio[dir1[1]])} {ops[dir1[1]]}.
\n{capitalise(ops[dir2[0]])} costs {describefraction(ratio[dir2[0]],ratio[dir2[1]])} {ops[dir2[1]]}.
", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"dirs": {"definition": "shuffle([0,1,2])", "name": "dirs"}, "dir2": {"definition": "[dirs[1],dirs[2]]", "name": "dir2"}, "dir1": {"definition": "[dirs[0],dirs[1]]", "name": "dir1"}, "wanted": {"definition": "dirs[1]", "name": "wanted"}, "letters": {"definition": "map(allops[j][1],j,0..2)", "name": "letters"}, "r1": {"definition": "random(possibleratios)", "name": "r1"}, "r2": {"definition": "random(possibleratios except r1)", "name": "r2"}, "ops": {"definition": "map(allops[j][0],j,0..2)", "name": "ops"}, "allops": {"definition": "shuffle([['overhauling the carburettor','C'],['replacing the brake pads','B'],['refilling the air-con','A'],['replacing the gearbox','G'],['balancing the wheels','W']])[0..3]", "name": "allops"}, "r3": {"definition": "random(possibleratios except [r1,r2])", "name": "r3"}, "f2": {"definition": "lcm(ratio[dirs[0]],ratio[dirs[2]])/ratio[dirs[2]]", "name": "f2"}, "f1": {"definition": "lcm(ratio[dirs[0]],ratio[dirs[2]])/ratio[dirs[0]]", "name": "f1"}, "total": {"definition": "ratiototal*factor", "name": "total"}, "possibleratios": {"definition": "[1,2,3,4,5,6,7,8]", "name": "possibleratios"}, "prices": {"definition": "map(ratio[j]*factor,j,[0,1,2])", "name": "prices"}, "gcdr": {"definition": "//gcd of r1,r2,r3\n gcd(gcd(r1,r2),r3)", "name": "gcdr"}, "ratiototal": {"definition": "sum(ratio)", "name": "ratiototal"}, "factor": {"definition": "random(12..20)", "name": "factor"}, "ratio": {"definition": "[r1/gcdr,r2/gcdr,r3/gcdr]", "name": "ratio"}}, "metadata": {"notes": "", "description": "Three items of work done on a car. Given total price, and a couple of ratios of prices between pairs of items, work out the cost of one of the items.
\nBased on question 4 from section 3 of the Maths-Aid workbook on numerical reasoning.
", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}], "pickQuestions": 0, "pickingStrategy": "all-ordered"}], "feedback": {"showtotalmark": false, "showactualmark": false, "allowrevealanswer": false, "advicethreshold": 0, "showanswerstate": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}