// Numbas version: finer_feedback_settings {"name": "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": [{"name": "James's copy of Numerical reasoning - ratio recipe", "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": {}, "type": "question", "statement": "A certain preparation consists of liquids $x$, $y$ and $z$ in the proportion {ratios[0]}:{ratios[1]}:{ratios[2]}.
", "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"]], "type": "string", "language": "jme"}}, "preamble": {"js": "", "css": ""}, "variable_groups": [], "parts": [{"showCorrectAnswer": true, "marks": 0, "type": "gapfill", "gaps": [{"maxValue": "amount", "showCorrectAnswer": true, "marks": 1, "minValue": "amount", "type": "numberentry", "showPrecisionHint": false, "scripts": {}}], "scripts": {}, "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}
"}], "progress": "ready", "variables": {"u": {"name": "u", "definition": "//amount of each liquid\n map(random(3..10)*ratios[j],j,0..2)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "lots": {"name": "lots", "definition": "floor(min(map(u[j]/ratios[j],j,0..2)\t))", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "ratios": {"name": "ratios", "definition": "map(rawratios[j]/rgcd,j,0..2)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "units": {"name": "units", "definition": "random('litres','gallons','millilitres')", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "rawratios": {"name": "rawratios", "definition": "shuffle([random(1..7 except 3),random(1..7 except 3),3])", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "ratiototal": {"name": "ratiototal", "definition": "sum(ratios)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "amount": {"name": "amount", "definition": "lots*ratiototal", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "uv": {"name": "uv", "definition": "vector(u)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "rv": {"name": "rv", "definition": "vector(ratios)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "rgcd": {"name": "rgcd", "definition": "gcd(gcd(rawratios[0],rawratios[1]),rawratios[2])", "description": "", "templateType": "anything", "group": "Ungrouped variables"}}, "tags": ["chain rule", "proportion", "ratio"], "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, "extensions": ["stats"], "question_groups": [{"name": "", "pickQuestions": 0, "pickingStrategy": "all-ordered", "questions": []}], "contributors": [{"name": "James McEvoy", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/922/"}]}]}], "contributors": [{"name": "James McEvoy", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/922/"}]}