// Numbas version: finer_feedback_settings {"name": "Recipe Proportions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["m", "n", "ing2mult", "ing1mult", "ing1", "ing2"], "name": "Recipe Proportions", "tags": ["proportion", "Proportion", "ratios", "Ratios"], "preamble": {"css": "", "js": ""}, "advice": "

Since the recipe is for {m} cakes and you want to make {n} cakes you will need to multiply the amount of each ingredient by $  \\dfrac{\\var{n}}{\\var{m}}$ or $\\simplify{{n}/{m}}$.

\n

\n

See http://www.mathsisfun.com/numbers/ratio.html  for more information about ratios and proportions.

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

Suppose that you want to make {n} cakes.

\n

How much {ing1} would you need? Give your answer in grams.

\n

[[0]] g

\n

How much {ing2} would you need? Give your answer in kg.

\n

[[1]] kg

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

The recipe below makes {m} fruit cakes.

\n

 $\\var{100*{m}}$ g self-raising flour

\n

$ \\var{75*{m}}$ g caster sugar

\n

$\\var{50*{m}}$ g margarine

\n

$ \\var{60*{m}}$ g mixed fruit

\n

$ \\var{1.5* {m}} $ eggs

\n

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"m": {"definition": "random(2,4,6)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "n": {"definition": "switch( m=2, random(4,8,10,12), m=4, random(2,8,12), m=6,random(2, 12))", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "ing2mult": {"definition": "switch( ing2 = 'flour', 100, ing2='sugar', 75, ing2='margarine', 50, ing2='fruit', 60)", "templateType": "anything", "group": "Ungrouped variables", "name": "ing2mult", "description": ""}, "ing1mult": {"definition": "switch( ing1 = 'flour', 100, ing1='sugar', 75, ing1='margarine', 50, ing1='fruit', 60)", "templateType": "anything", "group": "Ungrouped variables", "name": "ing1mult", "description": ""}, "ing1": {"definition": "random( 'flour', 'sugar', 'margarine', 'fruit')", "templateType": "anything", "group": "Ungrouped variables", "name": "ing1", "description": ""}, "ing2": {"definition": "switch( ing1 ='flour', random ( 'sugar', 'margarine', 'fruit'),ing1='sugar', random('flour', 'margarine', 'fruit'), ing1='margarine', random('flour', 'sugar','fruit'), random ('flour', 'sugar', 'margarine'))", "templateType": "anything", "group": "Ungrouped variables", "name": "ing2", "description": ""}}, "metadata": {"description": "

Given amounts of ingredients for n cakes, given list of ingredients for m.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "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/"}]}