// Numbas version: exam_results_page_options {"name": "Kinga's copy of James's copy of Numerical reasoning - ratio recipe", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "extensions": ["stats"], "ungrouped_variables": ["amount", "uv", "ratiototal", "rgcd", "units", "rawratios", "rv", "u", "lots", "ratios"], "preamble": {"js": "", "css": ""}, "statement": "

A Super Paint consists of three lequids $x$, $y$ and $z$ in the proportion {ratios[0]}:{ratios[1]}:{ratios[2]}.

", "metadata": {"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"}, "variables": {"u": {"group": "Ungrouped variables", "templateType": "anything", "definition": "//amount of each liquid\n map(random(3..10)*ratios[j],j,0..2)", "name": "u", "description": ""}, "uv": {"group": "Ungrouped variables", "templateType": "anything", "definition": "vector(u)", "name": "uv", "description": ""}, "lots": {"group": "Ungrouped variables", "templateType": "anything", "definition": "floor(min(map(u[j]/ratios[j],j,0..2)\t))", "name": "lots", "description": ""}, "ratios": {"group": "Ungrouped variables", "templateType": "anything", "definition": "map(rawratios[j]/rgcd,j,0..2)", "name": "ratios", "description": ""}, "ratiototal": {"group": "Ungrouped variables", "templateType": "anything", "definition": "sum(ratios)", "name": "ratiototal", "description": ""}, "units": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random('litres','gallons','millilitres')", "name": "units", "description": ""}, "amount": {"group": "Ungrouped variables", "templateType": "anything", "definition": "lots*ratiototal", "name": "amount", "description": ""}, "rgcd": {"group": "Ungrouped variables", "templateType": "anything", "definition": "gcd(gcd(rawratios[0],rawratios[1]),rawratios[2])", "name": "rgcd", "description": ""}, "rawratios": {"group": "Ungrouped variables", "templateType": "anything", "definition": "shuffle([random(1..7 except 3),random(1..7 except 3),3])", "name": "rawratios", "description": ""}, "rv": {"group": "Ungrouped variables", "templateType": "anything", "definition": "vector(ratios)", "name": "rv", "description": ""}}, "name": "Kinga's copy of James's copy of Numerical reasoning - ratio recipe", "tags": [], "parts": [{"showCorrectAnswer": true, "gaps": [{"variableReplacements": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "variableReplacementStrategy": "originalfirst", "minValue": "amount", "showCorrectAnswer": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "maxValue": "amount", "scripts": {}, "mustBeReduced": false, "type": "numberentry", "allowFractions": false}], "showFeedbackIcon": true, "scripts": {}, "prompt": "

How many {units} of the Super Paint 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}

", "variableReplacements": [], "marks": 0, "type": "gapfill", "variableReplacementStrategy": "originalfirst"}], "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])+\"$.\")", "parameters": [["j", "number"]], "language": "jme", "type": "string"}}, "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.

", "variable_groups": [], "type": "question", "contributors": [{"name": "Kinga Zaczek", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/472/"}]}]}], "contributors": [{"name": "Kinga Zaczek", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/472/"}]}