// 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", "type": "question", "statement": "

A family receive a box of chocolates as a gift. There are five different kinds of chocolate inside: plain, nut, caramel, dark and coconut.

\n

The box contains equal numbers of each kind of chocolate..

", "advice": "

a)

\n

100% 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.

\n

Caramel chocolate = $\\displaystyle\\frac{100}{5}$ = $20$% of the box.

\n

\n

\n

b) 

\n

The 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}.

\n

To do this, either divide {chocs} by 100 and mulitply by 20, OR multiply {chocs} by 0.2. The two methods will give the same result.

\n

Method 1: $\\displaystyle\\frac{\\var{chocs}}{100}$ x $20$ = $\\var{type}$;

\n

OR

\n

Method 2: $\\var{chocs}$ x $0.2$ = $\\var{type}$.

\n

\n

\n

c)

\n

There 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.

\n

Use the method from part a) to find out the equal share of each chocolate type.

\n

Each type = $\\displaystyle\\frac{100}{4}$ = $25$% of the box.

\n

\n

\n

d) 

\n

i)

\n

The 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.

\n

Insert the numbers of each into the gaps.

\n

Plain $\\var{p}$ : $\\var{d}$ Dark

\n

From 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}$. 

\n

The greatest common divisor is $\\var{gcd}$.

\n

Using this value to simplify down the ratio by dividing each term by the value, the final answer is

\n

Plain $\\var{ratio_plain}$ : $\\var{ratio_dark}$ Dark.

\n

This 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\")}.

\n

Therefore, it is not possible to simplify further and the final answer is

\n

Plain $\\var{p}$ : $\\var{d}$ Dark.

\n

This 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

\n

ii)

\n

The 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}$.

\n

Insert these two figures into the gaps.

\n

Coconut $\\var{c}$ : $\\var{rob}$ Other chocolates

\n

From 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}$. 

\n

The greatest common divisor is $\\var{gcd2}$.

\n

Using this value to simplify down the ratio by dividing each term by the value, the final answer is

\n

Coconut $\\var{ratio_coconut}$ : $\\var{ratio_rest}$ Other chocolates.

\n

This 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.

\n

Therefore, it is not possible to simplify further and the final answer is 

\n

Coconut $\\var{c}$ : $\\var{rob}$ Other chocolates.

\n

This 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.

", "variables": {"ratio_dark": {"templateType": "anything", "name": "ratio_dark", "definition": "d/gcd(p,d)", "description": "

Number of dark chocolates in ratio of plain to dark.

", "group": "Ungrouped variables"}, "ratio_rest": {"templateType": "anything", "name": "ratio_rest", "definition": "rob/gcd(c, rob)", "description": "

Number of 'rest of box' chocolates in ratio of coconut to rest of box.

", "group": "Ungrouped variables"}, "d": {"templateType": "anything", "name": "d", "definition": "random(1..3)*p", "description": "

Number of dark chocolates on day 3.

", "group": "Ungrouped variables"}, "gcd2": {"templateType": "anything", "name": "gcd2", "definition": "gcd(c,rob)", "description": "", "group": "Ungrouped variables"}, "type": {"templateType": "anything", "name": "type", "definition": "chocs/5", "description": "

Number of each type of chocolate in the box.

", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "name": "c", "definition": "random(1..14 except 7 except 11 except 13)", "description": "

Number of coconut chocolates on day 3.

", "group": "Ungrouped variables"}, "chocs": {"templateType": "randrange", "name": "chocs", "definition": "random(70..95#5)", "description": "

Total number of chocolates in the box before eating.

", "group": "Ungrouped variables"}, "rob": {"templateType": "anything", "name": "rob", "definition": "p+n+d", "description": "

Sum of the rest of the box excluding coconut.

", "group": "Ungrouped variables"}, "p": {"templateType": "anything", "name": "p", "definition": "random(2..5)", "description": "

Number of plain chocolates on day 3.

", "group": "Ungrouped variables"}, "ratio_plain": {"templateType": "anything", "name": "ratio_plain", "definition": "p/gcd(p,d)", "description": "

Number of plain chocolates in ratio of plain to dark.

", "group": "Ungrouped variables"}, "prob": {"templateType": "anything", "name": "prob", "definition": "precround({n/{a},2)", "description": "

Probability that a nutty chocolate is selected from the box on day 3.

", "group": "Ungrouped variables"}, "gcd": {"templateType": "anything", "name": "gcd", "definition": "gcd(p,d)", "description": "", "group": "Ungrouped variables"}, "n": {"templateType": "anything", "name": "n", "definition": "random(1..14 except 7 except 11 except 13)", "description": "

Number of nutty chocolates on day 3.

", "group": "Ungrouped variables"}, "a": {"templateType": "anything", "name": "a", "definition": "p+n+d+c", "description": "

Number of chocolates in the box on day 3.

", "group": "Ungrouped variables"}, "perc": {"templateType": "anything", "name": "perc", "definition": "100*(prob)", "description": "

Percentage version of probability.

", "group": "Ungrouped variables"}, "minusc": {"templateType": "anything", "name": "minusc", "definition": "{chocs-type}", "description": "

Number of chocolates in the box minus caramel.

", "group": "Ungrouped variables"}, "ratio_coconut": {"templateType": "anything", "name": "ratio_coconut", "definition": "c/gcd(c, rob)", "description": "

Number of coconut chocolates in ratio of coconut to rest of box.

", "group": "Ungrouped variables"}}, "extensions": [], "functions": {}, "tags": ["percentages", "ratios", "Ratios", "taxonomy"], "variable_groups": [], "parts": [{"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "20", "showFeedbackIcon": true, "minValue": "20", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "

What percentage of the box of chocolates is represented by the caramel chocolates?

\n

Caramel chocolate = [[0]] % of the box.

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "type", "showFeedbackIcon": true, "minValue": "type", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "

If there were $\\var{chocs}$ chocolates in the box originally, how many of each kind were there?

\n

There are [[0]] of each type of chocolate in the box.

\n

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "25", "showFeedbackIcon": true, "minValue": "25", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "

Caramel flavoured chocolate is the family favourite, and so all of these chocolates are eaten first, and none of the other kinds are touched.

\n

What percentage of the remaining chocolates are plain?

\n

Plain chocolates = [[0]]% of the box.

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "ratio_plain", "showFeedbackIcon": true, "minValue": "ratio_plain", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "ratio_dark", "showFeedbackIcon": true, "minValue": "ratio_dark", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "ratio_coconut", "showFeedbackIcon": true, "minValue": "ratio_coconut", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "ratio_rest", "showFeedbackIcon": true, "minValue": "ratio_rest", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "

Over 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

\n

i) What is the ratio of plain to dark chocolates? Give your answer in its simplest form.

\n

Plain [[0]] : [[1]] Dark

\n

\n

ii) What is the ratio of coconut chocolates to the rest of the box? Give your answer in its simplest form.

\n

Coconut [[2]] : [[3]] Rest of the box

\n

", "type": "gapfill"}], "ungrouped_variables": ["chocs", "type", "p", "n", "d", "c", "rob", "prob", "a", "perc", "minusc", "ratio_plain", "ratio_dark", "ratio_coconut", "ratio_rest", "gcd", "gcd2"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "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.

"}, "preamble": {"css": "", "js": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "contributors": [{"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}]}]}], "contributors": [{"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}]}