// Numbas version: exam_results_page_options {"name": "Simple ratios", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["this", "whichone", "u", "t", "y", "x"], "name": "Simple ratios", "tags": [], "question_groups": [{"pickingStrategy": "all-ordered", "name": "", "questions": [], "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "advice": "

The ratio of ingredients $X$ and $Y$ is $\\var{x}: \\var{y}$.

\n

This means that for every $\\var{x}$g of $X$, we need $\\var{y}$g of $Y$. You could imagine organising your ingredients so that you put ingredient $X$ into small bags containing $\\var{x}$g and ingredient $Y$ into small bags containing $\\var{y}$g.

\n

For each 'batch' of cake mixture you will need one bag of each of the secret ingredients, which will weigh a total of $ \\simplify { {x} + {y} }$g in total.

\n

For a total of $ \\simplify{{t} *({x}+{y})}$g of secret ingredients we will need $\\var{t}$ batches.

\n

This means we will need $ \\var{t} \\times \\var{whichone}=\\var{t*whichone} $g of ingredient {this}.

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

A cake recipe includes two secret ingredients $X$ and $Y$. These must be added so that the ratio $ X:Y $ is $\\var{x}:\\var{y}$.

\n

The combined weight of the two secret ingredients is $ \\simplify{{t}*({x}+{y})}$g.

\n

How much of ingredient {this} should be added?

\n

[[0]]g

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

Solve the following ratio problem.

", "type": "question", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"this": {"definition": "if(u=0,'$X$',\"$Y$\")", "templateType": "anything", "group": "Ungrouped variables", "name": "this", "description": ""}, "whichone": {"definition": "if(u=0,x,y)", "templateType": "anything", "group": "Ungrouped variables", "name": "whichone", "description": ""}, "u": {"definition": "random(0,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "u", "description": ""}, "t": {"definition": "random(3..7)", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}, "y": {"definition": "random(5,7,11,13)", "templateType": "anything", "group": "Ungrouped variables", "name": "y", "description": ""}, "x": {"definition": "random(2,4,6,8)", "templateType": "anything", "group": "Ungrouped variables", "name": "x", "description": ""}}, "showQuestionGroupNames": false, "metadata": {"description": "

Given the ratio of ingredients and the total amount of ingredients work out how much of one of the ingredients is needed.

", "licence": "Creative Commons Attribution 4.0 International"}, "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}]}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}