// Numbas version: exam_results_page_options {"name": "Maria's copy of 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": [{"preamble": {"js": "", "css": ""}, "rulesets": {}, "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

", "functions": {}, "tags": [], "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": [], "parts": [{"variableReplacementStrategy": "originalfirst", "sortAnswers": false, "prompt": "

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

\n

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

", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "minValue": "20", "maxValue": "20", "mustBeReduced": false, "showFractionHint": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "allowFractions": false, "mustBeReducedPC": 0, "correctAnswerFraction": false, "customName": "", "correctAnswerStyle": "plain", "type": "numberentry", "unitTests": [], "useCustomName": false, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "extendBaseMarkingAlgorithm": true}], "customName": "", "type": "gapfill", "unitTests": [], "useCustomName": false, "marks": 0, "extendBaseMarkingAlgorithm": true}, {"variableReplacementStrategy": "originalfirst", "sortAnswers": false, "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

", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "minValue": "type", "maxValue": "type", "mustBeReduced": false, "showFractionHint": true, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "allowFractions": false, "mustBeReducedPC": 0, "correctAnswerFraction": false, "customName": "", "correctAnswerStyle": "plain", "type": "numberentry", "unitTests": [], "useCustomName": false, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "extendBaseMarkingAlgorithm": true}], "customName": "", "type": "gapfill", "unitTests": [], "useCustomName": false, "marks": 0, "extendBaseMarkingAlgorithm": true}], "extensions": [], "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..

", "variables": {"ratio_dark": {"description": "

Number of dark chocolates in ratio of plain to dark.

", "definition": "d/gcd(p,d)", "group": "Ungrouped variables", "templateType": "anything", "name": "ratio_dark"}, "gcd": {"description": "", "definition": "gcd(p,d)", "group": "Ungrouped variables", "templateType": "anything", "name": "gcd"}, "gcd2": {"description": "", "definition": "gcd(c,rob)", "group": "Ungrouped variables", "templateType": "anything", "name": "gcd2"}, "c": {"description": "

Number of coconut chocolates on day 3.

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

Number of each type of chocolate in the box.

", "definition": "chocs/5", "group": "Ungrouped variables", "templateType": "anything", "name": "type"}, "n": {"description": "

Number of nutty chocolates on day 3.

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

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

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

Total number of chocolates in the box before eating.

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

Number of dark chocolates on day 3.

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

Number of plain chocolates in ratio of plain to dark.

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

Sum of the rest of the box excluding coconut.

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

Number of chocolates in the box minus caramel.

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

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

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

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

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

Number of plain chocolates on day 3.

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

Number of chocolates in the box on day 3.

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

Percentage version of probability.

", "definition": "100*(prob)", "group": "Ungrouped variables", "templateType": "anything", "name": "perc"}}, "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"}, "name": "Maria's copy of Percentages and ratios - box of chocolates", "variablesTest": {"maxRuns": 100, "condition": ""}, "type": "question", "contributors": [{"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}]}], "contributors": [{"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}