// Numbas version: exam_results_page_options {"name": "Maths Support: Numerical reasoning - ratio and percentage", "navigation": {"onleave": {"action": "none", "message": "

You haven't submitted an answer to this question.

"}, "reverse": false, "allowregen": true, "preventleave": false, "browse": true, "showfrontpage": false, "showresultspage": "never"}, "duration": 0.0, "metadata": {"notes": "", "description": "

Based on section 3 of the maths-aid/mathcentre workbook on numerical reasoning.

", "licence": "Creative Commons Attribution 4.0 International"}, "timing": {"timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "shufflequestions": false, "questions": [], "percentpass": 0.0, "allQuestions": true, "pickQuestions": 0, "type": "exam", "feedback": {"showtotalmark": true, "advicethreshold": 0.0, "showanswerstate": true, "showactualmark": true, "allowrevealanswer": true}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": [{"name": "Numerical Reasoning - percentage enlargement", "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/"}], "functions": {}, "ungrouped_variables": ["dir1", "dir2", "final", "prop1", "prop2", "prop2rel", "verbed1", "verbed2"], "tags": ["maths-aid", "numerical reasoning", "percentage", "Proportion", "proportion", "ratio"], "advice": "

The picture has been {verbed1} to {prop1}% or $\\simplify{{prop1}/100} \\left(=\\frac{\\var{prop1}}{100}\\right)$ of its original size.

\n

So to find the size of the first copy we multiply the original size by $\\simplify{{prop1}/100}$.

\n

If we then {verbed2} the new size by {prop2}%, the final copy would be {prop2rel}% of the size of the first copy, i.e. $\\simplify{{prop2rel}/100}$ of the size of the first copy.

\n

To get the size of the final copy as a proportion of the size of the original copy, we multiply $\\simplify{{prop1}/100}$ by $\\simplify{{prop2rel}/100}$ to get

\n

\\[\\simplify{{prop1}/100} \\times \\simplify{{prop2rel}/100} = \\simplify{{prop1*prop2rel}/10000}\\]

\n

Now to express this as a percentage we multiply by 100 and we obtain:

\n

\\[\\simplify{{prop1*prop2rel}/10000} \\times 100 = \\var{final}\\%.\\]

\n

So the final copy is {final}% of the size of the original picture.

", "rulesets": {}, "parts": [{"prompt": "

What percentage of the size of the original picture was the final copy?

\n

[[0]] %

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "final", "minValue": "final", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

A picture on a page was {verbed1} on a copier to {prop1}% of its original size, and this copy was then {verbed2} by {prop2}%.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"dir2": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "dir2", "description": ""}, "dir1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "dir1", "description": ""}, "prop2rel": {"definition": "100+dir2*prop2", "templateType": "anything", "group": "Ungrouped variables", "name": "prop2rel", "description": ""}, "prop1": {"definition": "100+dir1*random(10..40#10)", "templateType": "anything", "group": "Ungrouped variables", "name": "prop1", "description": ""}, "prop2": {"definition": "random(10..40#10)", "templateType": "randrange", "group": "Ungrouped variables", "name": "prop2", "description": ""}, "verbed2": {"definition": "if(dir2=1,'increased','reduced')", "templateType": "anything", "group": "Ungrouped variables", "name": "verbed2", "description": ""}, "verbed1": {"definition": "if(dir1=1,'increased','reduced')", "templateType": "anything", "group": "Ungrouped variables", "name": "verbed1", "description": ""}, "final": {"definition": "(prop1/100)*(100+dir2*prop2)", "templateType": "anything", "group": "Ungrouped variables", "name": "final", "description": ""}}, "metadata": {"notes": "", "description": "

Scale a page to some percentage of its original size, then increase/decrease by another percentage. Find the size of the final copy as a percentage of the original.

\n

Based on question 2 from section 3 of the Maths-Aid workbook on numerical reasoning.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Numerical Reasoning - percentage increase in price", "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/"}], "functions": {}, "tags": ["maths-aid", "money", "numerical reasoning", "percentage", "profit"], "advice": "

Think of the cost to produce as being 100%. The price is {percent}% greater, so is {percent+100}% of the cost, i.e. $\\frac{\\var{percent+100}}{100}$ of the cost.

\n

Hence the cost is $\\frac{100}{\\var{percent+100}} = \\simplify{100/{percent+100}}$ of the price = $\\simplify{100/{percent+100}} \\times £\\var{dpformat(sell,2)} = £\\var{produce}$.

\n

The profit = selling price - cost = £{dpformat(sell,2)} - £{produce} = £{dpformat(sell-produce,2)}.

", "rulesets": {}, "parts": [{"prompt": "

How much did it cost to produce the {thing[1]} and what was the profit?

\n

Cost to produce: £ [[0]]

\n

Profit: £ [[1]]

", "gaps": [{"minvalue": "produce", "type": "numberentry", "maxvalue": "produce", "marks": 1.0, "showPrecisionHint": false}, {"minvalue": "sell-produce", "type": "numberentry", "maxvalue": "sell-produce", "marks": 1.0, "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}], "statement": "

The selling price of {thing[0]} is £{dpformat(sell,2)}.

\n

This price was {percent}% greater than the cost to produce the {thing[1]}.

", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"sell": {"definition": "produce*(1+percent/100)", "name": "sell"}, "thing": {"definition": "random(['a box of chocolates','box'],['an action figure','toy'],['a scarf','scarf'])", "name": "thing"}, "produce": {"definition": "random(3..12 except 10)", "name": "produce"}, "percent": {"definition": "random(10..60#5)", "name": "percent"}}, "metadata": {"notes": "", "description": "

Given the selling price of an item both as a cash amount and as a percentage of the cost of production, find the cost of production and the profit.

\n

Based on question 1 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 - percentages and profit", "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/"}], "functions": {"commanumber": {"definition": "var parts=n.toString().split(\".\");\n return parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + (parts[1] ? \".\" + parts[1] : \"\");", "type": "string", "language": "javascript", "parameters": [["n", "number"]]}, "lcommanumber": {"definition": "var parts=n.toString().split(\".\");\n return parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\\\\!\") + (parts[1] ? \".\" + parts[1] : \"\");", "type": "string", "language": "javascript", "parameters": [["n", "number"]]}}, "tags": ["maths-aid", "money", "numerical reasoning", "profit"], "advice": "

First, work out the profit made on the original product.

\n

The original production cost was $\\var{produce}$ {pence} per unit. The profit per unit was $\\var{sell}-\\var{produce} = \\var{sell-produce}$ {pence} per unit.

\n

{commanumber(units1)} units of the original product were sold per month, so the total profit per month was

\n

\\[ \\var{latex(lcommanumber(units1))} \\times \\var{sell-produce} \\var{p} = \\var{latex(lcommanumber(profit1))} \\var{p} = \\var{latex(texpounds)} \\var{latex(lcommanumber(profit1/100))}. \\]

\n

Now work out the cost of producing the new product. The new product costs $\\var{percent}\\%$ more. $\\var{percent}\\%$ of $\\var{produce} = \\simplify{{percent}/100}$ of $\\var{produce} = \\var{produce2-produce}\\var{p}$.

\n

So the new production cost is $\\var{produce} + \\var{produce2-produce} = \\var{produce2} \\var{p}$. The profit per unit is now $\\var{sell} - \\var{produce2} = \\var{sell-produce2} \\var{p}$.

\n

{commanumber(units2)} units of the new product were sold per month, so the total profit per month is now

\n

\\[ \\var{latex(lcommanumber(units2))} \\times \\var{sell-produce2} \\var{p} = \\var{latex(lcommanumber(profit2))} \\var{p} = \\var{latex(texpounds)} \\var{latex(lcommanumber(profit2/100))}. \\]

\n

So the added profit is $\\var{latex(texpounds)}\\var{latex(lcommanumber(profit2/100))} - \\var{latex(texpounds)}\\var{latex(lcommanumber(profit1/100))} = \\var{latex(texpounds)}\\var{latex(lcommanumber(extraprofit))}.$

", "rulesets": {}, "parts": [{"prompt": "

If the manufacturer's selling price in each instance was {sell} {pence} per unit, what was the manufacturer's added profit per month with the newer product?

\n

{pounds} [[0]]

", "gaps": [{"minvalue": "extraprofit", "type": "numberentry", "maxvalue": "extraprofit", "marks": 1.0, "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}], "statement": "

A product costing {produce} {pence} per unit to produce had been selling at the average rate of {commanumber(units1)} units per month.

\n

After the product was improved, sales increased to an average of {commanumber(units2)} units per month. However, the new product cost {percent} percent more to produce.

", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"sell": {"definition": "produce+random(20..40#5)", "name": "sell"}, "units1": {"definition": "random(1..15)*mult", "name": "units1"}, "units2": {"definition": "ceil(profit1/(sell-produce2)/mult)*mult+random(1..8)*mult", "name": "units2"}, "produce2": {"definition": "produce*diff", "name": "produce2"}, "pounds": {"definition": "currency[0]", "name": "pounds"}, "texpounds": {"definition": "latex(if(pounds='$','\\\\$',pounds))", "name": "texpounds"}, "percent": {"definition": "(diff-1)*100", "name": "percent"}, "pence": {"definition": "currency[1]", "name": "pence"}, "p": {"definition": "currency[2]", "name": "p"}, "produce": {"definition": "random(40..95#5)", "name": "produce"}, "extraprofit": {"definition": "(profit2-profit1)/100", "name": "extraprofit"}, "diff": {"definition": "random(1.05..floor(20*sell/produce)/20#0.05)", "name": "diff"}, "currency": {"definition": "random(['$','cents','\u00a2'],['\u00a3','pence','p'],['\u20ac','cents','c'])", "name": "currency"}, "profit1": {"definition": "units1*(sell-produce)", "name": "profit1"}, "mult": {"definition": "10^random(3,4,5)", "name": "mult"}, "profit2": {"definition": "ceil(units2*(sell-produce2))", "name": "profit2"}}, "metadata": {"notes": "", "description": "

Given cost of production and price of sale of a product; a percentage increase in cost of production; and unit sales before and after; work out the extra profit.

\n

Based on question 6 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 - percentages of subsets", "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/"}], "functions": {}, "tags": ["numerical reasoning", "percentages", "ratio"], "advice": "

Calculate separately the percentage of employees who are female and working on the project, and the percentage who are male and working on the project, and add them together.

\n

1. Females

\n

{females}% of the department is female and {femaleproject}% of females are working on the project, hence the proportion of workers who are female and working on the project is {femaleproject}% of {females}% of the workers.

\n

In terms of fractions this is \\[ \\frac{\\var{femaleproject}}{100} \\times \\frac{\\var{females}}{100} = \\frac{\\var{femaleproject*females}}{10000} = \\frac{\\var{depfemaleproject}}{100}\\] of the workers, ie {depfemaleproject}%.

\n

So {depfemaleproject}% of the departmental staff are working on the project and female.

\n

2. Males

\n

 

\n

{males}% of the department is male and {maleproject}% of males are working on the project, hence the proportion of workers who are male and working on the project is {maleproject}% of {males}% of the workers.

\n

In terms of fractions this is \\[ \\frac{\\var{maleproject}}{100} \\times \\frac{\\var{males}}{100} = \\frac{\\var{maleproject*males}}{10000} = \\frac{\\var{depmaleproject}}{100}\\] of the workers, ie {depmaleproject}%.

\n

So {depmaleproject}% of the departmental staff are working on the project and male.

\n

So the total percentage of departmental staff working on the project is $\\var{depfemaleproject}\\% + \\var{depmaleproject}\\% = \\var{project}\\%$.

\n

 

", "rulesets": {}, "parts": [{"prompt": "

What percentage of the department is working on the project?

\n

[[0]] %

", "gaps": [{"minvalue": "{project}", "type": "numberentry", "maxvalue": "{project}", "marks": 1.0, "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}], "statement": "

In a certain department, {femaleproject}% of the females and {maleproject}% of the males are working on a project. {if(describefemales,females,males)}% of the department is {if(describefemales,'female','male')}.

", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"females": {"definition": "//percentage of all employees who are female\n random(20..80#5)", "name": "females"}, "describefemales": {"definition": "//Give the percentage of females in the statement, or give the males?\n random(true,false)", "name": "describefemales"}, "femaleproject": {"definition": "//percentage of females working on the project\n random(10..90#10)", "name": "femaleproject"}, "males": {"definition": "//percentage of all employees who are male\n 100-females", "name": "males"}, "depmaleproject": {"definition": "//proportion of employees who are male and working on the project\n maleproject*males/100", "name": "depmaleproject"}, "project": {"definition": "//total percentage of the department working on the project\n (females*femaleproject+males*maleproject)/100", "name": "project"}, "depfemaleproject": {"definition": "//proportion of employees who are female and working on the project\n femaleproject*females/100", "name": "depfemaleproject"}, "maleproject": {"definition": "//percentage of males working on the project\n random(10..90#10)", "name": "maleproject"}}, "metadata": {"notes": "", "description": "

Given percentages of males and females working on a project, and the percentage of the total staff who are male (or female), find the percentage of all staff working on the project.

\n

Based on question 3 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.

\n

Solution 1 (shares)

\n

We 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]]}. \\]

\n

We 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]]}.

\n

That 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.

\n

Hence there are $\\var{ratio[dirs[0]]}+\\var{ratio[dirs[1]]}+\\var{ratio[dirs[2]]} = \\var{ratiototal}$ shares to add up to £{total}.

\n

So 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]}.

\n

Solution 2 (algebra)

\n

Let $\\var{letters[0]}$ = {ops[0]}, $\\var{letters[1]}$ = {ops[1]}, $\\var{letters[2]}$ = {ops[2]}.

\n

We 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]]}$.

\n

Rearrange 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]]} \\]

\n

So \\[ \\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} \\]

\n

Hence $\\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]]}$.

\n

So 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}.

\n

These 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.

\n

Based 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": []}]}, {"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.

\n

So 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.

\n

We would like $U$ to be as big as possible.

\n

As we have $\\var{u[0]}$ {units} of $x$, {describesol(0)}

\n

As we have $\\var{u[1]}$ {units} of $y$, {describesol(1)}

\n

As we have $\\var{u[2]}$ {units} of $z$, {describesol(2)}

\n

So 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.

\n

Based 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": []}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}