// Numbas version: exam_results_page_options {"name": "Percentages: In Context - Vitamin nutrition in cereal", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Percentages: In Context - Vitamin nutrition in cereal", "tags": [], "metadata": {"description": "

Calculating the nutritional values of cereal as percentages of servings and RDAs

", "licence": "None specified"}, "statement": "

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n

Malted Wheats

\n
\n

Wheat Biscuits

\n
\n

Iron

\n
\n

{Fxp} % RDA per 100g

\n
\n

{Fyp} % RDA per 100g

\n
\n

Thiamin

\n
\n

{Sxp} % RDA per 100g

\n
\n

{Syp} % RDA per 100g

\n
Vitamin B6\n

{Ixp}  % RDA per 100g

\n
\n

{Iyp} % RDA per 100g

\n
Folic Acid\n

{Gxp} % RDA per 100g

\n
\n

{Gyp} % RDA per 100g

\n
Recommend serving size\n

{totalX}g

\n
\n

{totalY}g

\n
\n

The table above gives the nutrition information for two breakfast cereals.

", "advice": "


To calculate the value of nutrients per serving we need to think of the serving as a percentage of $100$g.

\n

For Malted Wheats the serving size is $\\var{totalx}$g, which, as a percentage of $100$g:

\n

\\[ \\frac{\\var{totalx}}{100} = \\var{totalx/100} = \\var{totalx} \\% \\]

\n

Similarly, for Wheat Biscuits, the serving size is $\\var{totaly}$g, which, as a percentage of $100$g:

\n

\\[ \\frac{\\var{totaly}}{100} = \\var{totaly/100} = \\var{totaly} \\% \\]

\n

We can now find the nutrient percentages per serving for each cereal:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n

Malted Wheats

\n
\n

Wheat Biscuits

\n
\n

Iron

\n
\n

$\\var{Fxp} \\times \\var{0.01 *totalX} = \\var{precround(Fx,1)}\\% \\text{ of RDA per serving}$

\n
\n

$\\var{Fyp} \\times \\var{0.01 *totalY} = \\var{precround(Fy,1)}\\% \\text{ of RDA per serving}$

\n
\n

Thiamin

\n
\n

$\\var{Sxp} \\times \\var{0.01 *totalX} = \\var{precround(Sx,1)}\\% \\text{ of RDA per serving}$

\n
\n

$\\var{Syp} \\times \\var{0.01 *totalY} = \\var{precround(Sy,1)}\\% \\text{ of RDA per serving}$

\n
Vitamin B6\n

$\\var{Ixp} \\times \\var{0.01 *totalX} = \\var{precround(Ix,1)} \\% \\text{ of RDA per serving}$

\n
\n

$\\var{Iyp} \\times \\var{0.01 *totalY} = \\var{precround(Iy,1)}\\% \\text{ of RDA per serving}$

\n
Folic Acid\n

$\\var{Gxp} \\times \\var{0.01 *totalX} = \\var{precround(Gx,1)}\\% \\text{ of RDA per serving}$

\n
\n

$\\var{Gyp} \\times \\var{0.01 *totalY} = \\var{precround(Gy,1)}\\% \\text{ of RDA per serving}$

\n
Serving size\n

$\\var{totalX} $g

\n
\n

$\\var{totalY} $g

\n
\n


By comparing the results we can see which cereal gives the greatest percentage of each nutrient per serving.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"Fx": {"name": "Fx", "group": "Ungrouped variables", "definition": "fxp*totalx/100\n", "description": "", "templateType": "anything", "can_override": false}, "Fy": {"name": "Fy", "group": "Ungrouped variables", "definition": "fyp*totaly/100", "description": "", "templateType": "anything", "can_override": false}, "Sx": {"name": "Sx", "group": "Ungrouped variables", "definition": "sxp*totalx/100\n", "description": "", "templateType": "anything", "can_override": false}, "Sy": {"name": "Sy", "group": "Ungrouped variables", "definition": "syp*totaly/100\n", "description": "

Sy

", "templateType": "anything", "can_override": false}, "Ix": {"name": "Ix", "group": "Ungrouped variables", "definition": "ixp*totalx/100\n", "description": "", "templateType": "anything", "can_override": false}, "Iy": {"name": "Iy", "group": "Ungrouped variables", "definition": "iyp*totaly/100\n", "description": "", "templateType": "anything", "can_override": false}, "Gx": {"name": "Gx", "group": "Ungrouped variables", "definition": "gxp*totalx/100\n", "description": "", "templateType": "anything", "can_override": false}, "Gy": {"name": "Gy", "group": "Ungrouped variables", "definition": "gyp*totaly/100\n", "description": "", "templateType": "anything", "can_override": false}, "total": {"name": "total", "group": "Ungrouped variables", "definition": "totalX + totaly\n", "description": "", "templateType": "anything", "can_override": false}, "totalX": {"name": "totalX", "group": "Ungrouped variables", "definition": "random(20..40 #2)", "description": "", "templateType": "anything", "can_override": false}, "Totaly": {"name": "Totaly", "group": "Ungrouped variables", "definition": "random(20..40 #2 except totalX)", "description": "", "templateType": "anything", "can_override": false}, "Fxp": {"name": "Fxp", "group": "percent", "definition": "random(60..90)", "description": "", "templateType": "anything", "can_override": false}, "sxp": {"name": "sxp", "group": "percent", "definition": "random(60..90)\n", "description": "", "templateType": "anything", "can_override": false}, "Ixp": {"name": "Ixp", "group": "percent", "definition": "random(60..90)", "description": "", "templateType": "anything", "can_override": false}, "gxp": {"name": "gxp", "group": "percent", "definition": "random(60..90) \n \n ", "description": "", "templateType": "anything", "can_override": false}, "iyp": {"name": "iyp", "group": "percent", "definition": "random(60..90)", "description": "", "templateType": "anything", "can_override": false}, "syp": {"name": "syp", "group": "percent", "definition": "random(60..90)", "description": "", "templateType": "anything", "can_override": false}, "gyp": {"name": "gyp", "group": "percent", "definition": "random(60..90)", "description": "", "templateType": "anything", "can_override": false}, "fyp": {"name": "fyp", "group": "percent", "definition": "random(60..90)", "description": "", "templateType": "anything", "can_override": false}, "Italy": {"name": "Italy", "group": "percent", "definition": "if(ixptotalx", "maxRuns": "35"}, "ungrouped_variables": ["Fx", "Sx", "Fy", "Sy", "Ix", "Iy", "Gx", "Gy", "total", "totalX", "Totaly"], "variable_groups": [{"name": "percent", "variables": ["Ixp", "sxp", "Fxp", "gxp", "iyp", "syp", "gyp", "fyp", "Italy", "Spain", "Germany"]}, {"name": "comparisons", "variables": []}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_x", "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": "

Select which cereal gives you the largest amount of each nutrient per serving.

", "minMarks": 0, "maxMarks": "4", "minAnswers": "4", "maxAnswers": "4", "shuffleChoices": false, "shuffleAnswers": false, "displayType": "radiogroup", "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["Iron", "Thiamin", "Vitamin B6", "Folic Acid"], "matrix": [["if(fx>fy,1,0)", "if(fx>fy,0,1)"], ["if(ix>iy,1,0)", "if(ix>iy,0,1)"], ["if(sx>sy,1,0)", "if(sxgy,1,0)", "if(gx