// Numbas version: exam_results_page_options {"type": "exam", "timing": {"timeout": {"message": "", "action": "none"}, "timedwarning": {"message": "", "action": "none"}, "allowPause": true}, "percentPass": 0, "name": "Weight and Mass", "showQuestionGroupNames": false, "feedback": {"showactualmark": true, "intro": "", "allowrevealanswer": true, "advicethreshold": 0, "showtotalmark": true, "feedbackmessages": [], "showanswerstate": true}, "duration": 0, "metadata": {"description": "

Work with measurements of weight, mass and density.

", "licence": "Creative Commons Attribution 4.0 International"}, "question_groups": [{"pickingStrategy": "all-ordered", "pickQuestions": 1, "name": "Group", "questions": [{"name": "Using compound units: price/weight of sweets", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "tags": ["Compound units", "compound units", "conversion", "measurements", "rate of pay", "speed", "taxonomy", "unit pricing", "using compound units"], "metadata": {"description": "

This question assesses the students ability to calculate and convert between different types of compound units, including rates of pay, speed and unit pricing.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

{pname} goes to {pronouns['their']} local shop and buys a bag containing $\\var{weight}$g of sweets for £$\\var{cost}$.

", "advice": "

a)

\n

We are given the price of a bag of $\\var{weight}$ grams of sweets.

\n

To find the price per 100g of sweets we divide the price of a bag of sweets by its weight in grams and then multiply this by $100$.

\n

\\[\\displaystyle\\frac{\\var{cost}}{\\var{weight}} \\times 100 = \\var{(100*cost/weight)}.\\] 

\n

\\begin{align}
\\displaystyle\\frac{\\var{cost}}{\\var{weight}} \\times 100 &= \\var{(100*cost/weight)}\\\\ &= \\var{dpformat(100*cost/weight,2)} \\; (\\text{rounded to $2$ decimal places}).
\\end{align}

\n

The sweets cost {pounds(100*cost/weight)} per 100g.

\n

b)

\n

To convert the cost from pounds per $100$ grams to pounds per kilogram we need to use the fact that $1\\text{g} = \\displaystyle\\frac{1}{1000}\\text{kg}$.

\n

This means that $100\\text{g} = \\displaystyle\\frac{1}{10}\\text{kg}$.

\n

We know from a) that sweets cost {pounds(100*cost/weight)} per 100g, which is the same as {pounds(100*cost/weight)} per $\\frac{1}{10}$kg.

\n

We want the price per one kilogram of sweets, so we multiply by $10$.

\n

Note that we use the actual value of $\\displaystyle\\frac{\\var{cost}}{\\var{weight}} \\times 100 = \\var{100*cost/weight}$ here to ensure that our final answer is accurate.

\n

\\begin{align}
\\var{100*cost/{weight}} \\times 10 &= \\var{dpformat(1000*{cost}/{weight},2)} \\; (2 \\; \\text{d.p})
\\end{align}

\n

So, the sweets cost {pounds(1000*cost/weight)} per kg.

\n

c)

\n

We worked out in part a) that sweets cost {pounds(100*cost/weight)} per 100g when bought in the bag, so at {pounds(pick_n_mix_cost)} per 100g the Pick'n'Mix is {if(pick_n_mix_cost<100*cost/weight,'cheaper','more expensive')} than buying the bag.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"pronouns": {"name": "pronouns", "group": "Ungrouped variables", "definition": "person['pronouns']", "description": "", "templateType": "anything", "can_override": false}, "cost": {"name": "cost", "group": "Ungrouped variables", "definition": "precround(cost_per_g*weight,1)-0.01", "description": "

Cost of a bag of sweets - always ends in .x9 to look like a real price.

", "templateType": "anything", "can_override": false}, "max_kg_cost": {"name": "max_kg_cost", "group": "Ungrouped variables", "definition": "max(precround(1000*cost/weight,2), precround(100*cost/weight,2)*10)", "description": "

Minimum acceptable cost per kg - using the rounded cost per 100g can introduce an error.

", "templateType": "anything", "can_override": false}, "pname": {"name": "pname", "group": "Ungrouped variables", "definition": "person['name']", "description": "", "templateType": "anything", "can_override": false}, "pick_n_mix_cost": {"name": "pick_n_mix_cost", "group": "Ungrouped variables", "definition": "precround(100*cost/weight,2)+random(-15..15 except -2..2)*0.01", "description": "

Cost of the sweets at the Pick'n'Mix, per 100g.

", "templateType": "anything", "can_override": false}, "min_kg_cost": {"name": "min_kg_cost", "group": "Ungrouped variables", "definition": "min(precround(1000*cost/weight,2), precround(100*cost/weight,2)*10)", "description": "

Minimum acceptable cost per kg - using the rounded cost per 100g can introduce an error.

", "templateType": "anything", "can_override": false}, "weight": {"name": "weight", "group": "Ungrouped variables", "definition": "random(150..200)", "description": "

Weight of a bag of sweets, in grams

", "templateType": "anything", "can_override": false}, "person": {"name": "person", "group": "Ungrouped variables", "definition": "random_person()", "description": "", "templateType": "anything", "can_override": false}, "cost_per_g": {"name": "cost_per_g", "group": "Ungrouped variables", "definition": "random(0.005..0.02#0)", "description": "

Cost of the sweets per gram, in pounds.

\n

Between 50p and £2 per 100g.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "10000"}, "ungrouped_variables": ["weight", "cost_per_g", "cost", "min_kg_cost", "max_kg_cost", "person", "pname", "pronouns", "pick_n_mix_cost"], "variable_groups": [], "functions": {"pounds": {"parameters": [["n", "number"]], "type": "string", "language": "jme", "definition": "currency(n,\"\u00a3\",\"p\")"}}, "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": "

How much do the sweets cost per $100$ grams?

\n

£[[0]] per $100$g

", "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": "100*cost/weight", "maxValue": "100*cost/weight", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "

Round your answer to $2$ decimal places.

", "strictPrecision": false, "showPrecisionHint": false, "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": "

How much is this in pounds per kilogram?

\n

£[[0]]  per kg

", "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": "1000*cost/weight", "maxValue": "1000*cost/weight", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "

Round your answer to $2$ decimal places.

", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "1_n_2", "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": "

{pname} notices that the same sweets are available from the Pick'n'Mix for {pounds(pick_n_mix_cost)} per 100g.

\n

Should {pronouns['they']} buy {pronouns['their']} sweets from the Pick'n'Mix instead?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

Yes, the Pick'n'Mix is cheaper.

", "

No, the Pick'n'Mix is more expensive.

"], "matrix": "if(pick_n_mix_cost<100*cost/weight,[1,0],[0,1])"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Converting units: baby weight", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}], "variable_groups": [{"variables": ["oz_to_kg", "weight_kg", "weight_lb", "weight_oz", "weight_oz_rem"], "name": "hospital baby"}, {"variables": ["news_reports", "news", "newskg"], "name": "News baby"}], "preamble": {"css": "", "js": ""}, "type": "question", "parts": [{"variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "scripts": {}, "minValue": "weight_lb", "maxValue": "weight_lb", "marks": 1, "variableReplacements": []}, {"correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "scripts": {}, "minValue": "weight_oz_rem", "maxValue": "weight_oz_rem", "marks": 1, "variableReplacements": []}], "marks": 0, "variableReplacements": [], "prompt": "

A hospital measures the weight of a baby to be $\\var{weight_kg}$kg, but they are asked for the weight in pounds and ounces by the baby's parents, who would like to make an announcement to their friends and family in the traditional way.

\n

Using the conversion table above, what is the weight in pounds (lb) and ounces (oz)?

\n

[[0]]lb and [[1]]oz        Round your answer to the nearest ounce.

", "steps": [{"correctAnswerFraction": false, "precisionType": "dp", "showCorrectAnswer": true, "precisionPartialCredit": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "showPrecisionHint": true, "minValue": "weight_oz", "maxValue": "weight_oz", "variableReplacements": [], "prompt": "

Using the conversion rate for kg to oz, what is the weight of the baby in ounces?

\n

", "precisionMessage": "You have not given your answer to the correct precision.", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "scripts": {}, "strictPrecision": false, "precision": 0, "marks": "0.5", "mustBeReduced": false}, {"correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "scripts": {}, "minValue": "weight_lb", "maxValue": "weight_lb", "marks": "0.5", "variableReplacements": [], "prompt": "

Now use the conversion rate for lb to oz. Rounding down, how many whole pounds does the baby weigh? 

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

What is the above weight in ounces?

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

Subtract the above weight from the baby's weight in ounces found in the first step. What is the remainder in ounces? 

"}], "showFeedbackIcon": true, "scripts": {}, "stepsPenalty": 0}, {"variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "precisionType": "dp", "type": "numberentry", "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "mustBeReducedPC": 0, "precisionPartialCredit": 0, "showFeedbackIcon": true, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "correctAnswerStyle": "plain", "minValue": "newskg", "maxValue": "newskg", "precision": "1", "marks": 1, "variableReplacements": [], "strictPrecision": false, "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision."}], "marks": 0, "variableReplacements": [], "prompt": "

In {news['year']}, newspapers reported the birth of {news['text']} with a weight over $1$ stone. The baby was recorded at $1$ stone, $\\var{news['lb']}$ pounds and $\\var{news['oz']}$ ounces.

\n

What was the weight in kg?

\n

[[0]] kg      round your answer to 1 decimal place.

", "scripts": {}, "showFeedbackIcon": true}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Convert weights of babies between kg and lb and oz.

"}, "tags": ["taxonomy"], "variables": {"weight_oz_rem": {"templateType": "anything", "definition": "mod(weight_oz,16)", "description": "

The remainder in ounces

", "name": "weight_oz_rem", "group": "hospital baby"}, "weight_lb": {"templateType": "anything", "definition": "floor(weight_oz/16)", "description": "

Weight of the baby in lb

", "name": "weight_lb", "group": "hospital baby"}, "news_reports": {"templateType": "json", "definition": "json_decode(safe(\"[\\n {\\n \\\"year\\\": 2016,\\n \\\"text\\\": \\\"only the second baby to be born in the UK\\\",\\n \\\"lb\\\": 1,\\n \\\"oz\\\": 8\\n },\\n {\\n \\\"year\\\": 2014,\\n \\\"text\\\": \\\"a boy in California\\\",\\n \\\"lb\\\": 2,\\n \\\"oz\\\": 2\\n },\\n {\\n \\\"year\\\": 2014,\\n \\\"text\\\": \\\"a boy in Florida, the heaviest ever recorded in the state,\\\",\\n \\\"lb\\\": 0,\\n \\\"oz\\\": 2\\n }, \\n {\\n \\\"year\\\": 2012,\\n \\\"text\\\": \\\"a record-breaking baby in China,\\\",\\n \\\"lb\\\": 1,\\n \\\"oz\\\": 5\\n } \\n]\"))", "description": "

A list of news reports

", "name": "news_reports", "group": "News baby"}, "newskg": {"templateType": "anything", "definition": "((16*(14+news['lb']))+news['oz'])/oz_to_kg", "description": "

Weight in kg of the baby in the news

", "name": "newskg", "group": "News baby"}, "news": {"templateType": "anything", "definition": "random(news_reports)", "description": "

The news report we're using

", "name": "news", "group": "News baby"}, "oz_to_kg": {"templateType": "anything", "definition": "35.3", "description": "

conversion rate, ounces in a kg

", "name": "oz_to_kg", "group": "hospital baby"}, "weight_kg": {"templateType": "anything", "definition": "precround(\n min(max(normalsample(3.5,1/1.96),2.5),5)\n,1)", "description": "

Weight of the baby in kg, given to the student in the question.

\n

Wikipedia says that the average baby of European heritage weighs 3.5kg, with 90% between 2.5 and 5.

\n

The min and max are to avoid really odd-looking weights.

", "name": "weight_kg", "group": "hospital baby"}, "weight_oz": {"templateType": "anything", "definition": "precround(weight_kg*oz_to_kg,0)", "description": "

weight of the baby in oz, rounded to the nearest integer

", "name": "weight_oz", "group": "hospital baby"}}, "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}, "ungrouped_variables": [], "statement": "

In many countries, it is still traditional to announce the weight of a baby in imperial units (pounds and ounces), rather than metric (grams or kilograms).

\n

A conversion table is as follows:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$1$ pound (lb)$16$ ounces (oz)
$1$ stone (st)$14$ pounds (lb)
$1$ kg$\\var{oz_to_kg}$ ounces (oz)
", "advice": "

a)

\n

We are told that the baby's weight is $\\var{weight_kg}$kg and we would like to convert this to pounds and ounces.

\n

To do this, we first obtain the weight in ounces using the conversion given:

\n

\\begin{align}
\\var{weight_kg} \\text{ kg}  &= \\var{weight_kg} \\times \\var{oz_to_kg} \\text{ oz} \\\\
&= \\var{weight_oz}\\text{ oz.}
\\end{align}

\n

We can now divide by $16$ to find out how many whole pounds we have:

\n

\\[ \\var{weight_oz}\\text{ oz} \\div 16 =  \\var{dpformat(weight_oz/16,1)}\\text{ lb.} \\]

\n

There are $\\var{weight_lb}$ whole pounds, which leaves a remainder

\n

\\[ \\var{weight_oz} - (16 \\times \\var{weight_lb}) =  \\var{weight_oz_rem} \\text{ oz.} \\]

\n

The baby weighs $\\var{weight_lb}$ pounds and $\\var{weight_oz_rem}$ ounces.

\n

b)

\n

We are given the weight of the baby in stones, pounds and ounces. To convert to kg we first convert the baby's weight to ounces.

\n

$1$ stone is $14$ pounds, so the baby weighs $\\var{news['lb']+14}$ pounds and $\\var{news['oz']}$ ounces, or

\n

\\[  (\\var{news['lb']+14} \\times 16) + \\var{news['oz']} = \\var{(news['lb']+14)*16+news['oz']} \\text{ oz.}\\]

\n

We can now convert to kg:

\n

\\begin{align}
\\var{(news['lb']+14)*16+news['oz']} \\text{ oz} &= \\var{(news['lb']+14)*16+news['oz']} \\div \\var{oz_to_kg}  \\\\
&= \\var{dpformat(newskg,1)}\\text{ kg.}
\\end{align}

\n

"}, {"name": "Calculate density given mass and volume", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "advice": "

a)

\n

We are told that the ball has a volume of $\\var{volume}\\text{cm}^3$ and a mass of $\\var{mass}$g, and we are asked to calculate the density of the box in g/cm$^3$.

\n

The formula for density is

\n

\\[\\begin{align} \\text{Density} &= \\frac{\\text{Mass}}{\\text{Volume}} \\\\[4pt]
&= \\frac{\\var{mass}}{\\var{volume}} \\\\[4pt]
&= \\var{density} \\\\
&= \\var{precround(density,2)}\\text{g/cm}^3\\text{.} \\\\
\\end{align}\\]

\n

b)

\n

Since the density of the ball is {if(density>1,'greater','smaller')} than the density of water, {person['name']}'s ball will {if(density>1,'sink','float')}.

\n

", "statement": "

A solid object placed in water will sink if its density is greater than that of water ($1\\text{g/cm}^3$).

\n

{person['name']}'s toy ball has a volume of $\\var{volume}\\text{cm}^3$ and a mass of $\\var{mass}$g. Whilst playing, {person['pronouns']['they']} drops {person['pronouns']['their']} ball into a pond.

", "variables": {"mass": {"name": "mass", "group": "Ungrouped variables", "definition": "random(55..65)", "templateType": "anything", "description": "

mass of the box

"}, "person": {"name": "person", "group": "Ungrouped variables", "definition": "random_person()", "templateType": "anything", "description": ""}, "density": {"name": "density", "group": "Ungrouped variables", "definition": "mass/volume", "templateType": "anything", "description": ""}, "volume": {"name": "volume", "group": "Ungrouped variables", "definition": "random(40..70 except mass)", "templateType": "anything", "description": "

Volume of box

"}, "mark_matrix": {"name": "mark_matrix", "group": "Ungrouped variables", "definition": "[if(density<1,1,0),if(density>1,1,0)]", "templateType": "anything", "description": ""}}, "tags": ["calculating density", "compound units", "Compound units", "density", "mass", "taxonomy", "Volume", "volume"], "ungrouped_variables": ["volume", "mass", "density", "person", "mark_matrix"], "functions": {}, "metadata": {"description": "

Calculate the density of an object given its mass and volume.

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"scripts": {}, "steps": [{"scripts": {}, "variableReplacements": [], "type": "information", "showCorrectAnswer": true, "marks": 0, "prompt": "

The relationship between density, mass and volume is

\n

\\[\\text{Density} = \\frac{\\text{Mass}}{\\text{Volume}}.\\]

", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}], "variableReplacements": [], "gaps": [{"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "precisionPartialCredit": 0, "strictPrecision": false, "correctAnswerFraction": false, "minValue": "density", "allowFractions": false, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "scripts": {}, "maxValue": "density", "showCorrectAnswer": true, "precision": "2", "type": "numberentry", "showPrecisionHint": false, "marks": 1, "precisionType": "dp", "variableReplacementStrategy": "originalfirst", "precisionMessage": "

Round your answer to $3$ significant figures.

"}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "prompt": "

What is the density of the ball? 

\n

[[0]] g/cm$^3$.      Round your answer to $2$ decimal places.

", "stepsPenalty": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}, {"variableReplacements": [], "maxMarks": 0, "displayType": "radiogroup", "choices": ["

It floats

", "

It sinks

"], "scripts": {}, "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "shuffleChoices": false, "prompt": "

Does {person['name']}'s ball float or sink?

", "marks": 0, "showFeedbackIcon": true, "matrix": "mark_matrix", "variableReplacementStrategy": "originalfirst", "minMarks": 0}], "type": "question", "variable_groups": [], "preamble": {"js": "", "css": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}}, {"name": "Limits of accuracy in measuring weight in a gym scenario", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "metadata": {"description": "

Work with lower and upper bounds for estimates of weight.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["weight1", "weight2", "total", "limit"], "statement": "

We use lower and upper bounds to describe intervals. We can use them to identify all the possible values that could round to a given number.

\n\n

For example, for 50 rounded to the nearest ten, the lowest bound is 45 since 45 is the lowest value that rounds to 50. The upper bound is 55 since 55 is the lowest value that rounds to 60 (the following ten).

", "variable_groups": [], "rulesets": {}, "type": "question", "advice": "

a)

\n

When using inequality symbols to show an error interval for $x$, we use

\n

\\[\\text{lower bound} \\leq x \\lt \\text{upper bound}\\]

\n

since the lower bound is included within the interval, while the upper bound is not.

\n

\n

b)

\n

To find bounds, we divide the degree of accuracy by 2 and subtract/add to our estimate to get lower and upper bounds respectively.

\n

The degree of accuracy is to the nearest 10 kg.

\n

\\[10 \\text{ kg} \\div 2 = 5 \\text{ kg}\\]

\n

\\[\\begin{align} \\text{Lower bound} = \\var{weight1} - 5 &= \\var{weight1 - 5} \\text{ kg}
\\\\\\text{Upper bound} = \\var{weight1} + 5 &= \\var{weight1 + 5} \\text{ kg}\\end{align}\\]

\n

\n

c)

\n

To calculate the lower bound of Alex and Cathy's total weight, we add the lower bounds of their individual weights:

\n

\\[ \\var{weight1 - 5} \\text{ kg} + \\var{weight2 - 5} \\text{ kg} = \\var{weight1 + weight2 - 10} \\text{ kg.}\\]

\n

Similarly for the upper bound,

\n

\\[ \\var{weight1 + 5} \\text{ kg} + \\var{weight2 + 5} \\text{ kg} = \\var{weight1 + weight2 + 10} \\text{ kg.}\\]

\n

\n

d)

\n

The upper bound for their total weight is $\\var{weight1 + weight2 + 10}$ kg.

\n

The weight limit is $\\var{limit}$ kg.

\n

Hence, the upper bound for their total weight is greater than the weight limit.

\n

\n

e)

\n

We have found that the upper bound is above the weight limit, so we won't consider the first option.

\n

To decide between the second and the third option, we compare the lower bound for Alex's and Cathy's total weight to the weight limit.

\n

Here, the lower bound ($\\var{weight1 + weight2 - 10}$ kg) is in fact less than the weight limit $\\var{limit}$ kg.

\n

Therefore, we cannot confirm nor deny whether it is safe for them to use the lift given the information we know.

", "parts": [{"scripts": {}, "gaps": [{"shuffleChoices": true, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["

<

", "

>

", "

", "

"], "distractors": ["Incorrect, as the lower bound is included in the interval", "Incorrect, as the lower bound is the lowest possible value within the interval", "", "Incorrect, as the lower bound is the lowest possible value within the interval"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": [0, 0, "1", 0], "displayType": "dropdownlist"}, {"shuffleChoices": true, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["

<

", "

>

", "

", "

"], "distractors": ["", "Incorrect, as the upper bound is higher than any value within the interval", "Incorrect, as the upper bound is NOT included in the interval", "Incorrect, as the upper bound is higher than any value within the interval"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": ["1", 0, 0, 0], "displayType": "dropdownlist"}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

Suppose we are given a rounded variable such as weight. Select the inequality signs that denote the interval that contains the true value before rounding:

\n

Lower bound  [[0]]weight  [[1]]upper bound

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

Alex is filling out an online form to join a new gym in Newcastle. One of the fields is asking for his weight in kg rounded to the nearest 10kg. Alex rounds his weight and writes down {weight1} kg. What are the upper and lower bounds for his weight?

\n

Lower bound =  [[0]]kg

\n

Upper bound =  [[1]]kg

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

Alex's friend Cathy is also joining the gym. She writes {weight2} kg in the weight field.

\n

Suppose Alex and Cathy meet up to go to the gym together for the first time. Their gym is located on the 8th floor of the building. They can either use the lift or the staircase to get there. Cathy wants to be active and go up the stairs but Alex doesn't want to do any exercise before he changes to his gym clothes and wants to use the lift. The weight limit for the lift is {limit} kg.

\n

Calculate the lower and upper bounds for their total weight.

\n

Lower bound for Alex's weight $+$ Cathy's weight $=$  [[0]]kg

\n

Upper bound for Alex's weight $+$ Cathy's weight $=$  [[1]]kg

", "variableReplacementStrategy": "originalfirst"}, {"scripts": {}, "gaps": [{"shuffleChoices": false, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["

>

", "

<

", "

=

"], "distractors": ["", "", ""], "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": ["1", 0, 0], "displayType": "dropdownlist"}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

Select the correct inequality sign between the following:

\n

Upper bound for Alex's and Cathy's total weight [[0]] Weight limit for the lift

\n

", "variableReplacementStrategy": "originalfirst"}, {"shuffleChoices": false, "variableReplacements": [], "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "prompt": "

Given what we know, what is our conclusion? Is it safe for them to take the lift together without going over the allowed weight limit?

\n

\n

\n

", "type": "1_n_2", "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "minMarks": 0, "choices": ["

It is perfectly safe for them to use the lift because the upper bound for their total weight is below the allowed weight limit.

", "

We cannot be sure whether it is safe for them to use the lift because the upper bound for their total weight is above the allowed weight limit, while the lower bound is still below the weight limit.

", "

We can confidently say that it is unsafe for them to use the lift because their total weight exceeds the weight limit in all posibilities.

"], "marks": 0, "distractors": ["", "", ""], "matrix": [0, "2", 0], "displayType": "radiogroup"}], "tags": ["limits of accuracy", "lower bounds", "taxonomy", "upper bounds"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"weight2": {"description": "", "definition": "random(total-weight1)", "group": "Ungrouped variables", "name": "weight2", "templateType": "anything"}, "weight1": {"description": "", "definition": "random(50..100 #10)", "group": "Ungrouped variables", "name": "weight1", "templateType": "anything"}, "total": {"description": "", "definition": "random(140..180 #10)", "group": "Ungrouped variables", "name": "total", "templateType": "anything"}, "limit": {"description": "", "definition": "total + random(0..9.5 #0.5)", "group": "Ungrouped variables", "name": "limit", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}]}], "showstudentname": true, "navigation": {"showresultspage": "oncompletion", "showfrontpage": true, "preventleave": true, "browse": true, "reverse": true, "allowregen": true, "onleave": {"message": "", "action": "none"}}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": ["random_person", "stats"], "custom_part_types": [], "resources": []}