// Numbas version: exam_results_page_options {"name": "Percentages and ratios - box of chocolates", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Percentages and ratios - box of chocolates", "tags": [], "metadata": {"description": "
A simple situational question about a box of chocolates, asking how many of each type there are, what percentage of the box they represent, the probability of picking one and ratios of different types.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "\n\n\nA family receive a box of chocolates as a gift. There are five different kinds of chocolate inside: plain, nut, caramel, dark and coconut.
\nThe box contains equal numbers of each kind of chocolate..
", "advice": "\n100% represents the whole box of chocolates. As there are 5 different kinds of chocolate in the box and they are all represented equally, to calculate the percentage chocolates which are caramel, divide 100 by 5.
\nCaramel chocolate = $\\displaystyle\\frac{100}{5}$ = $20$% of the box.
\n\n\nb)
\nThe original number of chocolates in the box is stated. We worked out above that each type of chocolate makes up 20% of the box, so we need to work out 20% of {chocs}.
\nTo do this, either divide {chocs} by 100 and multiply by 20, OR multiply {chocs} by 0.2. The two methods will give the same result.
\nMethod 1: $\\displaystyle\\frac{\\var{chocs}}{100}$ x $20$ = $\\var{type}$;
\nOR
\nMethod 2: $\\var{chocs}$ x $0.2$ = $\\var{type}$.
\n\n\nc)
\nThere are now {type} fewer chocolates in the box, but the remaining chocolates now represent 100% of the box. There are now only 4 types of chocolate in it and there is still equal representation inside the box.
\nUse the method from part a) to find out the equal share of each chocolate type.
\nEach type = $\\displaystyle\\frac{100}{4}$ = $25$% of the box.
\n\n\nd)
\ni)
\nThe first section asks you to compare plain chocolate and dark chocolate. It states that there are {p} plain chocolates and {d} dark chocolates left in the box.
\nInsert the numbers of each into the gaps.
\nPlain $\\var{p}$ : $\\var{d}$ Dark
\nFrom this, we should look to see if this answer can be simplified down. To do this, we need to find the greatest common divisor of $\\var{p}$ and $\\var{d}$.
\nThe greatest common divisor is $\\var{gcd}$.
\nUsing this value to simplify down the ratio by dividing each term by the value, the final answer is
\nPlain $\\var{ratio_plain}$ : $\\var{ratio_dark}$ Dark.
\nThis states that for every {ratio_plain} plain {if(ratio_plain=1,\"chocolate\",\"chocolates\")}, there {if(ratio_dark=1,\"is\",\"are\")} {ratio_dark} dark {if(ratio_dark=1,\"chocolate\",\"chocolates\")}.
\nTherefore, it is not possible to simplify further and the final answer is
\nPlain $\\var{p}$ : $\\var{d}$ Dark.
\nThis states that for every {p} plain {if(p=1,\"chocolate\",\"chocolates\")}, there {if(d=1,\"is\",\"are\")}{d} dark {if(d=1,\"chocolate\",\"chocolates\")}.
\n\nii)
\nThe second section asks you to compare coconut chocolates and the rest of the box. It states that there are {c} coconut chocolates. To calculate the number of chocolates in the rest of the box, add together the stated amounts of plain, dark and nutty chocolates:
\n$\\var{p}+\\var{d}+\\var{n}$ = $\\var{rob}$.
\nInsert these two figures into the gaps.
\nCoconut $\\var{c}$ : $\\var{rob}$ Other chocolates
\nFrom this, we should look to see if this answer can be simplified down. To do this, we need to find the greatest common divisor of $\\var{c}$ and $\\var{rob}$.
\nThe greatest common divisor is $\\var{gcd2}$.
\nUsing this value to simplify down the ratio by dividing each term by the value, the final answer is
\nCoconut $\\var{ratio_coconut}$ : $\\var{ratio_rest}$ Other chocolates.
\nThis states that for every {ratio_coconut} coconut {if(ratio_coconut=1,\"chocolate\",\"chocolates\")}, there {if(ratio_rest=1,\"is\",\"are\")} {ratio_rest} other {if(ratio_rest=1,\"chocolate\",\"chocolates\")} in the box.
\nTherefore, it is not possible to simplify further and the final answer is
\nCoconut $\\var{c}$ : $\\var{rob}$ Other chocolates.
\nThis states that for every {c} coconut {if(c=1,\"chocolate\",\"chocolates\")}, there {if(rob=1,\"is\",\"are\")} {rob} other {if(rob=1,\"chocolate\",\"chocolates\")} in the box.
", "rulesets": {}, "extensions": [], "variables": {"ratio_dark": {"name": "ratio_dark", "group": "Ungrouped variables", "definition": "d/gcd(p,d)", "description": "\nNumber of dark chocolates in ratio of plain to dark.
", "templateType": "anything"}, "prob": {"name": "prob", "group": "Ungrouped variables", "definition": "precround({n/{a},2)", "description": "\nProbability that a nutty chocolate is selected from the box on day 3.
", "templateType": "anything"}, "type": {"name": "type", "group": "Ungrouped variables", "definition": "chocs/5", "description": "\nNumber of each type of chocolate in the box initially.
", "templateType": "anything"}, "minusc": {"name": "minusc", "group": "Ungrouped variables", "definition": "{chocs-type}", "description": "\nNumber of chocolates in the box minus caramel.
", "templateType": "anything"}, "chocs": {"name": "chocs", "group": "Ungrouped variables", "definition": "random(70 .. 95#5)", "description": "\n\nTotal number of chocolates in the box before eating.
", "templateType": "randrange"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "p+n+d+c", "description": "\n\nNumber of chocolates in the box on day 3.
", "templateType": "anything"}, "gcd2": {"name": "gcd2", "group": "Ungrouped variables", "definition": "gcd(c,rob)", "description": "\n", "templateType": "anything"}, "perc": {"name": "perc", "group": "Ungrouped variables", "definition": "100*(prob)", "description": "\nPercentage version of probability.
", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(1..14 except 7 except 11 except 13)", "description": "\n\nNumber of nutty chocolates on day 3.
", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(1..3)*p", "description": "\n\nNumber of dark chocolates on day 3.
", "templateType": "anything"}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "\n\nNumber of plain chocolates on day 3.
", "templateType": "anything"}, "ratio_coconut": {"name": "ratio_coconut", "group": "Ungrouped variables", "definition": "c/gcd(c, rob)", "description": "\nNumber of coconut chocolates in ratio of coconut to rest of box.
", "templateType": "anything"}, "ratio_plain": {"name": "ratio_plain", "group": "Ungrouped variables", "definition": "p/gcd(p,d)", "description": "\nNumber of plain chocolates in ratio of plain to dark.
", "templateType": "anything"}, "rob": {"name": "rob", "group": "Ungrouped variables", "definition": "p+n+d", "description": "\n\n\nSum of the rest of the box excluding coconut.
", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..14 except 7 except 11 except 13)", "description": "\n\n\nNumber of coconut chocolates on day 3.
", "templateType": "anything"}, "ratio_rest": {"name": "ratio_rest", "group": "Ungrouped variables", "definition": "rob/gcd(c, rob)", "description": "\nNumber of 'rest of box' chocolates in ratio of coconut to rest of box.
", "templateType": "anything"}, "gcd": {"name": "gcd", "group": "Ungrouped variables", "definition": "gcd(p,d)", "description": "\n", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["chocs", "type", "p", "n", "d", "c", "rob", "prob", "a", "perc", "minusc", "ratio_plain", "ratio_dark", "ratio_coconut", "ratio_rest", "gcd", "gcd2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n\nWhat percentage of the box of chocolates is represented by the caramel chocolates?
\nCaramel chocolate = [[0]] % of the box.
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "20", "maxValue": "20", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n\n\nIf there were $\\var{chocs}$ chocolates in the box originally, how many of each kind were there?
\nThere are [[0]] of each type of chocolate in the box.
\n", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "type", "maxValue": "type", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n\nCaramel flavoured chocolate is the family favourite, and so all of these chocolates are eaten first, and none of the other kinds are touched.
\nWhat percentage of the remaining chocolates are plain?
\nPlain chocolates = [[0]]% of the box.
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "25", "maxValue": "25", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n\nOver the next few days, the remaining chocolates in the box are slowly devoured so that by day three, all that remain are:
\n$\\var{p}$ plain chocolates, $\\var{n}$ nutty chocolates, $\\var{c}$ coconut chocolates and $\\var{d}$ dark chocolates.
\n\ni) What is the ratio of plain to dark chocolates? Give your answer in its simplest form.
\nPlain [[0]] : [[1]] Dark
\n\nii) What is the ratio of coconut chocolates to the rest of the box? Give your answer in its simplest form.
\nCoconut [[2]] : [[3]] Rest of the box
\n", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ratio_plain", "maxValue": "ratio_plain", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ratio_dark", "maxValue": "ratio_dark", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ratio_coconut", "maxValue": "ratio_coconut", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ratio_rest", "maxValue": "ratio_rest", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Adelle Colbourn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2083/"}]}]}], "contributors": [{"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Adelle Colbourn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2083/"}]}