// Numbas version: exam_results_page_options {"question_groups": [{"name": "Group", "pickQuestions": 1, "pickingStrategy": "all-ordered", "questions": [{"name": "Calculating a simple rate of pay", "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", "rate of pay", "taxonomy"], "metadata": {"description": "

Calculate a rate of pay (in pounds per week) given the total pay over a given period of time.

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

{pname} gets paid a total of $£\\var{payment}$ at the end of {their} summer job; {they} work{s} for $\\var{weeks}$ weeks.

", "advice": "

We are told that {pname} gets paid a total of $£\\var{payment}$ at the end of {their} summer job and that {they} work{s} at {their} job for $\\var{weeks}$ weeks.

\n

To calculate the amount of money {pname} gets paid per week, we divide the total amount of money that {they} earn{s} at the end of {their} job by how many weeks that {they} work{s} for.

\n

\\[£\\displaystyle\\frac{\\var{payment}}{\\var{weeks}} = £\\var{{payment/weeks}}.\\]

\n

Therefore {pname} gets paid $£\\var{{payment/weeks}}$/week.

\n

Note that in compound measures, a forward slash symbol / is often used instead of the word 'per'. So $£\\var{{payment/weeks}}$/week means the same as $£\\var{{payment/weeks}}$ per week.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"person": {"name": "person", "group": "A person", "definition": "random_person()", "description": "

A random person

", "templateType": "anything", "can_override": false}, "weeks": {"name": "weeks", "group": "Ungrouped variables", "definition": "random(5,8)", "description": "

Number of weeks person works for

", "templateType": "anything", "can_override": false}, "payment": {"name": "payment", "group": "Ungrouped variables", "definition": "random(1400,1600,1800)", "description": "

amount person gets paid

", "templateType": "anything", "can_override": false}, "pname": {"name": "pname", "group": "A person", "definition": "person[\"name\"]", "description": "", "templateType": "anything", "can_override": false}, "they": {"name": "they", "group": "A person", "definition": "person[\"pronouns\"][\"they\"]", "description": "", "templateType": "anything", "can_override": false}, "their": {"name": "their", "group": "A person", "definition": "person[\"pronouns\"][\"their\"]", "description": "", "templateType": "anything", "can_override": false}, "theirs": {"name": "theirs", "group": "A person", "definition": "person[\"pronouns\"][\"theirs\"]", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "A person", "definition": "if(person[\"gender\"]=\"neutral\",\"\",\"s\")", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["payment", "weeks"], "variable_groups": [{"name": "A person", "variables": ["person", "pname", "they", "their", "theirs", "s"]}], "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": "

How much does {pname} get paid per week?

\n

£[[0]]/week

", "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": "{payment}/{weeks}", "maxValue": "{payment}/{weeks}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Rounding and estimating calculations - adding up prices in a shop", "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/"}], "type": "question", "tags": ["random names", "taxonomy"], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"cash": {"templateType": "anything", "name": "cash", "description": "

Amount of cash we have.

", "definition": "if(can_afford,\n ceil(total_rounded_up)\n ,\n ceil(sum(p)+ice_cream)-1\n)\n ", "group": "Randoms"}, "can_afford": {"templateType": "anything", "name": "can_afford", "description": "

Can we afford all three items?

", "definition": "random(true,false)", "group": "Randoms"}, "total_rounded_up": {"templateType": "anything", "name": "total_rounded_up", "description": "

Total price of the three items when rounding up.

", "definition": "precround(p[0]+0.05,1) + precround(p[1]+0.05,1) + precround(ice_cream,1)", "group": "Randoms"}, "flavour": {"templateType": "anything", "name": "flavour", "description": "

Flavour of the ice cream.

", "definition": "random(\"strawberry cheesecake\", \"cookie dough\", \"mint chocolate chip\", \"vanilla\", \"raspberry\", \"Neapolitan\")", "group": "Randoms"}, "ice_cream": {"templateType": "anything", "name": "ice_cream", "description": "

Price of the ice cream

", "definition": "(random(100..380#10)+9)/100", "group": "Randoms"}, "p": {"templateType": "anything", "name": "p", "description": "

Prices of the first two items.

", "definition": "repeat((random(30..200 #10) + random(1..9))/100,2)", "group": "Randoms"}}, "functions": {"pounds": {"parameters": [["n", "number"]], "type": "string", "language": "jme", "definition": "if(n>=1,currency(n,\"\u00a3\",\"\"), \"\u00a3\"+dpformat(n,2))"}}, "statement": "

Imagine you are shopping at the supermarket. You only have £{cash} in cash. There are two items in your basket so far, costing {currency(p[0],\"£\",\"p\")} and {currency(p[1],\"£\",\"p\")}.

\n

Just before checkout, you notice a tasty {flavour} ice cream on the shelf. It costs {currency(ice_cream,\"£\",\"p\")}. Can you put this in your basket without going over your limit?

", "variable_groups": [{"name": "Randoms", "variables": ["p", "ice_cream", "total_rounded_up", "can_afford", "cash", "flavour"]}, {"name": "Answers", "variables": []}], "parts": [{"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"displayColumns": 0, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "choices": ["

Round up.

", "

Round down.

"], "showFeedbackIcon": true, "shuffleChoices": false, "matrix": ["1", "0"], "variableReplacements": [], "marks": 0, "scripts": {}, "showCorrectAnswer": true, "maxMarks": 0, "type": "1_n_2"}], "showCorrectAnswer": true, "prompt": "

If we don't want to underestimate the total price of these items, do we round the individual prices up, or down?

\n

[[0]]

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

Estimate the total price if we buy the ice cream, rounding the price of each item to 1 decimal place.

\n

£ [[0]]

\n

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"displayColumns": 0, "minMarks": 0, "type": "1_n_2", "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "choices": ["

Yes, we do have enough cash.

", "

No, we may not have enough.

"], "showFeedbackIcon": true, "shuffleChoices": false, "matrix": "if(can_afford,[1,0],[0,1])", "variableReplacements": [], "marks": 0, "scripts": {}, "showCorrectAnswer": true, "maxMarks": 0}], "showCorrectAnswer": true, "prompt": "

Can we be sure that we have enough cash to pay for all three items?

\n

[[0]]

", "type": "gapfill"}], "ungrouped_variables": [], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Estimate whether you can afford an extra item in a shop by rounding prices to the nearest 10p.

"}, "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

We want to ensure we won't go over the limit, so it is better to overestimate. If we underestimated, we could potentially think we have enough money when we don't.

\n

To overestimate our total, we round each price up.

\n

b)

\n

We round up all our values to 1 decimal place:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Original prices£{p[0]}£{p[1]}£{ice_cream}
Rounded up{pounds(precround(p[0]+0.05,1))}{pounds(precround(p[1]+0.05,1))}{pounds(precround(ice_cream,1))}
\n

Now we calculate the total of these rounded numbers:

\n

\\[ \\var{pounds(precround(p[0]+0.05,1))} + \\var{pounds(precround(p[1]+0.05,1))} + \\var{pounds(precround(ice_cream,1))} = \\var{pounds(total_rounded_up)} \\]

\n

c)

\n

As the estimated total, £{dpformat(total_rounded_up,2)}, is {if(can_afford,'lower','higher')} than £{cash}, we {if(can_afford,'do have','may not have')} enough money to purchase the {flavour} ice cream.

"}, {"name": "Partial sum of an arithmetic sequence - birthday money", "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": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}], "variable_groups": [{"variables": ["person", "pronouns"], "name": "A person"}], "functions": {}, "rulesets": {}, "ungrouped_variables": ["m", "n", "c", "ci", "ni", "b", "first"], "metadata": {"description": "

The amount of money a person gets on their birthday follows an arithmetic sequence.

\n

Calculate the amount on a given birthday, then calculate the sum up to that point.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "advice": "

We are told that {person['name']}'s parents deposit a uniformly increasing amount of money into a savings account for {person['name']} every year on {person['name']}'s birthday.

\n

We are also given the amount of money that {person['pronouns']['their']} parents deposit into the account on {person['pronouns']['their']} first $3$ birthdays:

\n\n

a)

\n

To calculate the amount of money {person['name']}'s parents would deposit into the savings account on {person['pronouns']['their']} 21st birthday, if {pronouns['their']} parents maintained this pattern, we use the equation

\n

\\[a_n=a_1+(n-1)d\\text{,}\\]

\n

where

\n\n

To identify the first term and common difference of the sequence we can use a table like the one below.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$n$$1$$2$$3$
$a_n$$\\mathbf{\\var{first}}$$\\var{b[1]+first}$$\\var{b[1]*2+first}$
First differences$\\mathbf{\\var{b[1]}}$$\\mathbf{\\var{b[1]}}$
\n

The first term and common difference have been highlighted in bold: $a_1 = \\var{first}$ and $d = \\var{b[1]}$.

\n

Now we can use these to calculate $a_{21}$, giving us

\n

\\begin{align}
a_{21}&=\\var{first}+\\var{b[1]} \\times (21-1) \\\\
&=\\var{first+b[1]*(20)}\\text{.} \\\\
\\end{align}

\n

So, assuming that {person['name']}'s parents do maintain this pattern, on {pronouns['their']} 21st birthday {pronouns['their']} parents will deposit $£\\var{first+b[1]*(20)}$ into the savings account.

\n

b)

\n

We are now asked to calculate the total amount of money that {person['name']}'s parents will have added to this savings account over 21 years, including the money that {pronouns['their']} parents will deposit into the account on {pronouns['their']} 21st birthday.

\n

This question involves calculating the sum using the equation

\n

\\[\\sum\\limits_{i=1}^n{a_i}=\\frac{n}{2}(a_1+a_n)\\text{.}\\]

\n

We know from part a) that

\n

\\begin{align}
a_1&=\\var{first},\\\\
n&=21,\\\\
a_{21}&= \\var{first+b[1]*(20)}.
\\end{align}

\n

Using our formula for the sum,

\n

\\begin{align}
\\sum\\limits_{i=1}^n{a_i}&=\\frac{n}{2}(a_1+a_n)\\\\
&=\\frac{\\var{21}}{2}(\\var{first}+\\var{first+b[1]*(21-1)})\\\\
&=\\var{21*(first+first+b[1]*(20))/2}\\text{.}
\\end{align}

\n

Therefore, over 21 years {person['name']}'s parents will have added a total of $£\\var{21*(first+first+b[1]*(20))/2}$ to this savings account!

", "statement": "

{person['name']}'s parents deposit a uniformly increasing amount of money into a savings account for {pronouns['them']} every year on {pronouns['their']} birthday:

\n\n

{person['name']} wants to know the total amount of money that will be in this savings account, excluding interest, after {pronouns['their']} 21st birthday, if {pronouns['their']} parents maintain this pattern.

", "preamble": {"js": "", "css": ""}, "variables": {"c": {"name": "c", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(3..13 except[10]),8)"}, "n": {"name": "n", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(3..9),7)"}, "person": {"name": "person", "description": "

A random person

", "templateType": "anything", "group": "A person", "definition": "random_person()"}, "m": {"name": "m", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(2..10),5)"}, "first": {"name": "first", "description": "

first term in the sequence

", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(10..15 #5)"}, "pronouns": {"name": "pronouns", "description": "", "templateType": "anything", "group": "A person", "definition": "person['pronouns']"}, "ni": {"name": "ni", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(19..40),10)"}, "b": {"name": "b", "description": "

a

", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(10..25 #5), 3)"}, "ci": {"name": "ci", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(6..20),10)"}}, "parts": [{"variableReplacementStrategy": "originalfirst", "prompt": "

How much money will {person['name']}'s parents deposit into the savings account on {pronouns['their']} 21st birthday, if {pronouns['their']} parents maintain this pattern? 

\n

£[[0]].

", "stepsPenalty": 0, "gaps": [{"answer": "{first+b[1]*(20)}", "showpreview": true, "expectedvariablenames": [], "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "type": "jme", "checkingaccuracy": 0.001, "variableReplacements": [], "vsetrange": [0, 1], "checkvariablenames": false, "showFeedbackIcon": true, "scripts": {}, "marks": 1, "showCorrectAnswer": true}], "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "gapfill", "marks": 0, "steps": [{"variableReplacementStrategy": "originalfirst", "prompt": "

Use the arithmetic formula,

\n

\\[a_n = a_1 + (n-1)d, \\]

\n

where

\n", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "information", "marks": 0, "showCorrectAnswer": true}, {"variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "maxValue": "{first}", "allowFractions": false, "prompt": "

What is the value of $a_1$?

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

What is the value of $d$?

", "mustBeReducedPC": 0, "minValue": "{b[1]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": "0.2", "scripts": {}}, {"variableReplacementStrategy": "originalfirst", "prompt": "

Now use the formula to calculate $a_{21}$.

", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "information", "marks": 0, "showCorrectAnswer": true}], "showCorrectAnswer": true}, {"variableReplacementStrategy": "originalfirst", "prompt": "

How much money will {person['name']}'s parents have added to this savings account over $21$ years in total, including the money that {person['pronouns']['their']} parents will deposit into the account on {person['pronouns']['their']} $21^{st}$ birthday?

\n

£[[0]].

\n

", "stepsPenalty": 0, "gaps": [{"variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "maxValue": "{21*(first+first+b[1]*(20))/2}", "allowFractions": false, "mustBeReducedPC": 0, "minValue": "{21*(first+first+b[1]*(20))/2}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 1, "scripts": {}}], "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "gapfill", "marks": 0, "steps": [{"variableReplacementStrategy": "originalfirst", "prompt": "

The sum of an arithmetic sequence $a_1, a_2, \\ldots, a_n$ is calculated by the following formula.

\n

\\[\\sum\\limits_{i=1}^n{a_i}=\\frac{n}{2}(a_1+a_n)\\text{.}\\]

", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "information", "marks": 0, "showCorrectAnswer": true}], "showCorrectAnswer": true}], "tags": ["Arithmetic sequences", "Arithmetic Sequences", "arithmetic sequences", "nth term", "partial sums", "random names", "sequences", "taxonomy"], "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Cumulative percent decrease", "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": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}, {"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "type": "question", "tags": ["decrease", "percentages", "taxonomy"], "variablesTest": {"condition": "", "maxRuns": "1000"}, "variables": {"test": {"definition": "precround(precround(price*((100-perc)/100)^5, 2)*((100-perc)/100)^(n-5), 2)", "description": "

Calculated value of price2 to ensure we mention rounding errors in advice only when needed.

", "templateType": "anything", "name": "test", "group": "Part b)"}, "pricee3": {"definition": "precround(price*((100 - perc)/100)^(testn-2),2)", "description": "", "templateType": "anything", "name": "pricee3", "group": "Part b)"}, "person": {"definition": "random_person()", "description": "", "templateType": "anything", "name": "person", "group": "Part b)"}, "testn": {"definition": "random(6..9)", "description": "

Number of months in total.

", "templateType": "anything", "name": "testn", "group": "Part b)"}, "pricee1": {"definition": "precround(price*((100 - perc)/100)^(testn),2)", "description": "

The resulting price after the total of testn months.

", "templateType": "anything", "name": "pricee1", "group": "Part b)"}, "n": {"definition": "if(pricee2 < threshold, testn-1, testn)", "description": "", "templateType": "anything", "name": "n", "group": "Part b)"}, "threshold": {"definition": "siground(pricee1+5,2)", "description": "", "templateType": "anything", "name": "threshold", "group": "Part b)"}, "price": {"definition": "random(300..800) + 0.99", "description": "

The original price.

", "templateType": "anything", "name": "price", "group": "Part a)"}, "price2": {"definition": "if(pricee2 < threshold, pricee2, pricee1)", "description": "", "templateType": "anything", "name": "price2", "group": "Part b)"}, "perc": {"definition": "random(2..4 #0.5)", "description": "

Percentage decrease per month.

", "templateType": "anything", "name": "perc", "group": "Part a)"}, "pricee2": {"definition": "precround(price*((100 - perc)/100)^(testn-1),2)", "description": "", "templateType": "anything", "name": "pricee2", "group": "Part b)"}}, "statement": "

A smartphone's value decreases by $\\var{perc}$% every month. The original price when it is released is $£\\var{price}$.

", "variable_groups": [{"name": "Part a)", "variables": ["price", "perc"]}, {"name": "Part b)", "variables": ["threshold", "pricee1", "pricee2", "pricee3", "testn", "test", "price2", "n", "person"]}], "parts": [{"showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "stepsPenalty": 0, "gaps": [{"correctAnswerFraction": false, "precisionMessage": "

Round your answer to $2$ decimal places.

", "precisionPartialCredit": 0, "scripts": {}, "maxValue": "precround(price*((100-perc)/100)^5, 2)", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "precision": "2", "precisionType": "dp", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "minValue": "precround(price*((100-perc)/100)^5, 2)", "showPrecisionHint": true, "marks": "2", "variableReplacements": [], "strictPrecision": false, "showCorrectAnswer": true, "type": "numberentry"}], "showFeedbackIcon": true, "prompt": "

How much will the smartphone be worth after $5$ months?

\n

£ [[0]]

", "steps": [{"scripts": {}, "variableReplacements": [], "type": "information", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "prompt": "

The original price of the phone is $£\\var{price}$ and we are told that the price decreases by $\\var{perc}$% every month.

\n

", "marks": 0}, {"correctAnswerFraction": false, "scripts": {}, "maxValue": "1-{perc}/100", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "prompt": "

What is the decimal multiplier for the decrease in the smartphones each month?

", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "minValue": "1-{perc}/100", "variableReplacements": [], "marks": "0.5", "showCorrectAnswer": true, "type": "numberentry"}, {"precisionMessage": "

Round your answer to $2$ decimal places.

", "precisionPartialCredit": 0, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "prompt": "

Multiply the original price by the decimal multiplier to obtain the price after 1 month.

", "mustBeReducedPC": 0, "mustBeReduced": false, "minValue": "{price}*(1-{perc}/100)", "variableReplacements": [], "marks": "0.5", "strictPrecision": false, "showCorrectAnswer": true, "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "precision": "2", "maxValue": "{price}*(1-{perc}/100)", "precisionType": "dp", "correctAnswerStyle": "plain", "showPrecisionHint": true}, {"precisionMessage": "

Round your answer to $2$ decimal places.

", "precisionPartialCredit": 0, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "prompt": "

Multiply your answer above by the decimal multiplier to obtain the price after 2 months. 

\n

Note that this is the same as multiplying the original price by $d^2$, where $d$ is the decimal multiplier.

", "mustBeReducedPC": 0, "mustBeReduced": false, "minValue": "{price}*(1-{perc}/100)^2", "variableReplacements": [], "marks": "0.5", "strictPrecision": false, "showCorrectAnswer": true, "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "precision": "2", "maxValue": "{price}*(1-{perc}/100)^2", "precisionType": "dp", "correctAnswerStyle": "plain", "showPrecisionHint": true}], "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "maxValue": "n-5", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "minValue": "n-5", "variableReplacements": [], "marks": "2", "showCorrectAnswer": true, "type": "numberentry"}], "showFeedbackIcon": true, "prompt": "

{person['name']} has $£\\var{threshold}$ to spend on a smartphone. After how many more full months will {person['pronouns']['they']} be able to afford the smartphone?

\n

[[0]] months

", "marks": 0}], "ungrouped_variables": [], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Given the original price of a smartphone and the rate at which it decreases, calculate its price after a given number of months. In the second part, calculate the time remaining until the price goes below a certain point.

"}, "preamble": {"css": "", "js": ""}, "functions": {}, "advice": "

a)

\n

We can use the multiplier method to calculate the new price. If the price decreases by {perc}%, this its value is {100-perc}% of the original value after 1 month. The decimal multiplier for {100-perc}% is

\n

\\[\\frac{\\var{100-perc}}{100} = \\var{(100-perc)/100} \\text{.}\\]

\n

Each month our smartphone's value can be found by multiplying the previous month's value by the decimal multiplier. For example, after the first month, the value is

\n

\\[ \\var{(100-perc)/100} \\times\\mathrm{£}\\var{price} = \\mathrm{£}\\var{dpformat(price*(100-perc)/100,2)}\\text{.} \\]

\n

To calculate the price after 5 months, we multiply the original price of the smartphone by our multiplier 5 times:

\n

\\[ \\begin{align} \\text{Final worth} &= \\var{price} \\times \\var{(100-perc)/100} \\times \\var{(100-perc)/100} \\times \\var{(100-perc)/100} \\times \\var{(100-perc)/100} \\times \\var{(100-perc)/100} \\\\&=  \\var{price} \\times \\var{(100-perc)/100}^{5} \\\\&= £\\var{precround(price*((100-perc)/100)^5, 2)} {.} \\end{align}\\]

\n

b)

\n

From part a), the value after 5 months is  £$\\var{precround(price*((100-perc)/100)^5, 2)}$. Continuing to multiply the price by the decimal multiplier,

\n

\\[£\\var{precround(price*((100-perc)/100)^5, 2)} \\times \\var{(100-perc)/100} = £\\var{precround(precround(price*((100-perc)/100)^5, 2)*(100-perc)/100, 2)}\\]

\n

\\[£\\var{precround(price*((100-perc)/100)^5, 2)} \\times \\var{(100-perc)/100}^2 = £\\var{precround(precround(price*((100-perc)/100)^6, 2)*(100-perc)/100, 2)}\\]

\n

\\[£\\var{precround(price*((100-perc)/100)^5, 2)} \\times \\var{(100-perc)/100}^3 = £\\var{precround(precround(price*((100-perc)/100)^7, 2)*(100-perc)/100, 2)}\\]

\n

\\[£\\var{precround(price*((100-perc)/100)^5, 2)} \\times \\var{(100-perc)/100}^4 = £\\var{precround(precround(price*((100-perc)/100)^8, 2)*(100-perc)/100, 2)}\\]

\n

\n

The smartphone's value will be below $£\\var{threshold}$ after {n-5} more months ({n} months in total since its release).

"}, {"name": "Applied y-intercepts: Investing in boats", "extensions": ["geogebra", "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": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}], "metadata": {"description": "

This question provides an example of an initial bank account investment with a fixed return and tests the student's understanding of an application of intercepts.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["p", "friend", "m", "c", "bal"], "type": "question", "advice": "

a)

\n

The balance increases by £{m} each year, so $m = \\var{m}$.

\n

We know that at $x = 9$ years, $y = \\var{bal}$. Substituting these values into the equation, we obtain

\n

\\[ \\var{bal} = \\var{m} \\times 9 + c \\]

\n

Rearrange this to find $c$:

\n

\\begin{align}
c &= \\var{bal} - \\var{m} \\times 9 \\\\
&= \\var{bal} - \\var{m*9} \\\\
&= \\var{c} 
\\end{align}

\n

So the formula for the account balance is

\n

\\[y = \\var{m}x+\\var{c}\\text{.}\\]

\n

b)

\n

The constant term $\\var{c}$ determines the point at which the line crosses the $y$-axis. This point is called the $y$-intercept.

\n

c)

\n

The initial investment is the value of $y$ at $x = 0$, so it's £{c}$.

\n

d)

\n

It is useful to plot the graph of {friend['name']}'s savings account against your own for comparison ({friend['name']}'s balance is shown as a dashed line):

\n

{geogebra_applet('gpFmg3Ex',[[\"p\",p],[\"m\",m],[\"c\",c]])}

\n

Using this graph, we can see that only two of the statements are true:

\n\n

As the gradients of the two lines on the graph are the same, we can eliminate the other two statements about the lines converging and about having a higher gradient.

", "variable_groups": [], "rulesets": {}, "statement": "

You are a forgetful investor set on saving enough money to buy a new fishing boat for when you retire.

\n

Your savings account manager tells you your savings account is worth £{formatnumber(bal,\"en\")}. 

\n

You have forgotten the principal amount you started with the account with; however you do know that you have been saving for exactly nine years now and your manager informs you that the bank has been paying you a premium of £{m} per year.

\n

Your account manager shows you this graph, which plots account balance over time for a given principal amount.

\n

The line on the graph below can be repositioned by dragging the slider.

\n

{geogebra_applet('HtnCWSSQ',[[\"p\",p],[\"m\",m],[\"c\",c]])} 

", "parts": [{"scripts": {}, "gaps": [{"showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkingaccuracy": 0.001, "showFeedbackIcon": true, "checkvariablenames": false, "type": "jme", "answer": "{m}x+{c}", "scripts": {}, "variableReplacements": [], "checkingtype": "absdiff", "vsetrange": [0, 1], "marks": 1, "expectedvariablenames": []}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

With $y$ representing the account balance and $x$ the number of years the account has been open, give an expression for the balance in the form $y=mx+c$.

\n

$y=$ [[0]]

\n

", "variableReplacementStrategy": "originalfirst"}, {"shuffleChoices": true, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "prompt": "

Which of the following elements of the graph corresponds to the constant part of the equation?

", "showFeedbackIcon": true, "displayColumns": 0, "choices": ["

y-intercept

", "

x-intercept

", "

z-intercept

", "

The origin

"], "scripts": {}, "distractors": ["", "", "", ""], "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "matrix": ["1", 0, 0, 0], "displayType": "dropdownlist"}, {"scripts": {}, "gaps": [{"showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkingaccuracy": 0.001, "showFeedbackIcon": true, "checkvariablenames": false, "type": "jme", "answer": "{c}", "scripts": {}, "variableReplacements": [], "checkingtype": "absdiff", "vsetrange": [0, 1], "marks": 1, "expectedvariablenames": []}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

From your answer to the last question, state the initial investment you made towards saving for your new fishing boat.

\n

Initial investment $=$ $£$[[0]].

", "variableReplacementStrategy": "originalfirst"}, {"shuffleChoices": true, "type": "m_n_2", "maxAnswers": 0, "minMarks": 0, "showCorrectAnswer": true, "minAnswers": 0, "prompt": "

Your friend, {friend['name']}, is considerably wealthier than you are, so {friend['pronouns']['they']} {if(friend['gender']='neutral','start','starts')} with twice the investment you did but still {if(friend['gender']='neutral','receive','receives')} the same annual payment of $£\\var{m}$.

\n

Which of the following statements comparing the graph of {friend['name']}'s account balance to yours are true?

", "showFeedbackIcon": true, "displayColumns": "1", "choices": ["

The gradient is equal and hence {friend['pronouns']['their']} line would be parallel to yours.

", "

The plot of {friend['pronouns']['their']} balance crosses the $y$-axis at a higher point than yours.

", "

The plot of {friend['pronouns']['their']} balance has a higher gradient.

", "

The plots of your balance and {friend['pronouns']['theirs']} cross at some point.

"], "scripts": {}, "distractors": ["", "", "", ""], "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "matrix": ["1", "1", 0, 0], "displayType": "checkbox", "warningType": "none"}], "tags": ["applications of y-intercepts", "taxonomy", "y-intercept"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"bal": {"description": "", "group": "Ungrouped variables", "definition": "m*9+c", "name": "bal", "templateType": "anything"}, "c": {"description": "", "group": "Ungrouped variables", "definition": "random(995,1005,1010,1015,1020,1025)", "name": "c", "templateType": "anything"}, "p": {"description": "

not intercept, starting intercept

", "group": "Ungrouped variables", "definition": "1100", "name": "p", "templateType": "anything"}, "friend": {"description": "", "group": "Ungrouped variables", "definition": "random_person()", "name": "friend", "templateType": "anything"}, "m": {"description": "", "group": "Ungrouped variables", "definition": "random(15,30,45)", "name": "m", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Using compound units - room hire price per hour and per minute", "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/"}], "tags": ["taxonomy"], "metadata": {"description": "

Given the cost of hiring a room for a given number of hours, compare with competing prices given per hour and per minute.

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

{pname} has been tasked with booking a room for a {hours}-hour meeting.

", "advice": "

a)

\n

The price per hour is the total price divide by the number of hours.

\n

\\[ \\text{Price per hour} = \\frac{\\var{block_price_per_hour*hours}}{\\var{hours}} = £\\var{dpformat(block_price_per_hour,2)} \\text{ per hour} \\]

\n

b)

\n

The price is given in pence per minute. To convert to pounds per minute, divide by $100$:

\n

\\[ \\var{100*competitor_price_per_minute} \\text{ p/minute} = £\\var{dpformat(competitor_price_per_minute,2)} \\text{ per minute} \\]

\n

Then to convert to pounds per hour, multiply by $60$:

\n

\\[ £\\var{dpformat(competitor_price_per_minute,2)} \\text{ per minute} = £\\var{dpformat(competitor_price_per_minute*60,2)} \\text{ per hour} \\]

\n

c)

\n

{pname} should choose the method with the lowest cost per hour, which is {best_method}.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"competitor_price_per_minute": {"name": "competitor_price_per_minute", "group": "Ungrouped variables", "definition": "floor(100*block_price_per_hour/60*(1+random(0.1..0.3#0)*random(-1,1)))/100", "description": "

Price of booking at RoomCo, the competitor, in pounds per minute

", "templateType": "anything", "can_override": false}, "pronouns": {"name": "pronouns", "group": "Person", "definition": "person['pronouns']", "description": "", "templateType": "anything", "can_override": false}, "best_method": {"name": "best_method", "group": "Ungrouped variables", "definition": "switch(\n min(prices)=block_price_per_hour,\n 'paying in advance at ACME',\n min(prices)=single_price_per_hour,\n 'pay-as-you-go at ACME',\n 'paying per minute at RoomCo'\n)", "description": "

A description of the cheapest method.

", "templateType": "anything", "can_override": false}, "block_price_per_hour": {"name": "block_price_per_hour", "group": "Ungrouped variables", "definition": "random(10..25#0.25)", "description": "

Price of booking the room at ACME in advance, in pounds per hour

", "templateType": "anything", "can_override": false}, "hours": {"name": "hours", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "

Length of the meeting in hours

", "templateType": "anything", "can_override": false}, "pname": {"name": "pname", "group": "Person", "definition": "person['name']", "description": "", "templateType": "anything", "can_override": false}, "marking_matrix": {"name": "marking_matrix", "group": "Ungrouped variables", "definition": "let(best,min(prices),\n map(if(x=best,1,0),x,prices)\n)", "description": "

Marking matrix for the \"which method is best\" part.

", "templateType": "anything", "can_override": false}, "single_price_per_hour": {"name": "single_price_per_hour", "group": "Ungrouped variables", "definition": "block_price_per_hour+random(0.5..2#0.25)*random(-1,1)", "description": "

Pay-as-you-go price at ACME, in pounds per hour

", "templateType": "anything", "can_override": false}, "verbs": {"name": "verbs", "group": "Person", "definition": "if(person['gender']='neutral','','s')", "description": "", "templateType": "anything", "can_override": false}, "prices": {"name": "prices", "group": "Ungrouped variables", "definition": "[block_price_per_hour,single_price_per_hour,60*competitor_price_per_minute]", "description": "", "templateType": "anything", "can_override": false}, "person": {"name": "person", "group": "Person", "definition": "random_person()", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "100"}, "ungrouped_variables": ["hours", "block_price_per_hour", "single_price_per_hour", "competitor_price_per_minute", "marking_matrix", "prices", "best_method"], "variable_groups": [{"name": "Person", "variables": ["person", "pronouns", "pname", "verbs"]}], "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": "

{pname} is quoted a price of {pounds(block_price_per_hour*hours)} by ACME Office Services to book a room in advance for {hours} hours, or {pounds(single_price_per_hour)} per hour in a pay-as-you-go scheme.

\n

To compare the two prices, {pronouns['they']} decide{verbs} to convert the advance booking price to a price per hour.

\n

Price per hour: £ [[0]]

", "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": "block_price_per_hour", "maxValue": "block_price_per_hour", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": 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": "

A competitor, RoomCo, is offering meeting rooms charged by the minute, at {pounds(competitor_price_per_minute)} per minute.

\n

To compare this price to ACME's offer, {pname} decide{verbs} to convert it to a price per hour.

\n

Price per hour: £ [[0]]

\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": "60*competitor_price_per_minute", "maxValue": "60*competitor_price_per_minute", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "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": "

How should {pname} book the room?

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

Pay in advance at ACME

", "

Pay-as-you-go at ACME

", "

Pay per minute at RoomCo

"], "matrix": "marking_matrix"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"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": "Compound units : shopping for bananas", "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/"}], "metadata": {"description": "

This question assesses the student's ability to use some given information involving two different units of measurement to rewrite the information as a compound measure.

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "type": "question", "ungrouped_variables": ["person", "a", "b", "b_pack", "b_single", "mark_matrix"], "advice": "

a)

\n

The pack price at Fine Fare supermarket is {b_pack}, which converted to pence is {b}p.

\n

The price per banana at Fine Fare supermarket is

\n

\\[ \\var{b} \\div 5 = \\var{b_single}\\text{p.}\\]

\n

b)

\n

As the price at Hintons supermarket is cheaper, {person['pronouns']['they']} should shop there.

\n

c)

\n

The new price per banana at Fine Fare Supermarket is

\n

\\begin{align}
\\var{b} \\div 6 &= \\var{if(isint(b/6),b/6,dpformat(b/6,1))}\\text{p.} \\\\
\\end{align}

\n

Since the price at Hintons Supermarket is still cheaper, {person['name']} should not change {person['pronouns']['their']} decision.

\n

Since the price at Fine Fare Supermarket is now cheaper, {person['name']} should change {person['pronouns']['their']} decision.

\n

", "variable_groups": [], "statement": "

{person['name']} is shopping for bananas and has two local supermarkets:

\n

Hintons Supermarket charges {a}p per banana.

\n

Fine Fare Supermarket charges {b_pack} for a pack of 5 bananas.

", "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "prompt": "

What is the price per banana (in pence) at Fine Fare Supermarket?

\n

[[0]]p/banana

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

If {person['name']} is interested in getting the best value for money per banana, which supermarket should {person['pronouns']['they']} shop at?

", "choices": ["

Hintons Supermarket

", "

Fine Fare Supermarket

"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "maxMarks": 0, "marks": 0, "distractors": ["", ""], "matrix": ["1", 0], "displayType": "radiogroup"}, {"shuffleChoices": false, "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "prompt": "

{person['name']} notices that some of the bags of bananas at Fine Fare Supermarket contain 6 bananas and wonders if that will make a difference to {person['pronouns']['their']} decision. Assuming that {person['pronouns']['they']} can get hold of a pack of 6 bananas at Fine Fare, which supermarket should {person['pronouns']['they']} now shop at?

", "choices": ["

Hintons Supermarket

", "

Fine Fare Supermarket

"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": "mark_matrix", "displayType": "radiogroup"}], "tags": ["compound measures", "Compound measures", "Compound units of measurement", "price", "rate of pay", "taxonomy"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"b_pack": {"description": "

formatted price of the pack

", "group": "Ungrouped variables", "definition": "currency(b/100,\"\u00a3\",\"p\")", "name": "b_pack", "templateType": "anything"}, "b_single": {"description": "

Single banana price at fine fare

", "group": "Ungrouped variables", "definition": "b/5", "name": "b_single", "templateType": "anything"}, "a": {"description": "

cost per banana in Hintons

", "group": "Ungrouped variables", "definition": "random(12..19)", "name": "a", "templateType": "anything"}, "b": {"description": "

Price of pack of bananas at Fine Fare

", "group": "Ungrouped variables", "definition": "a*5+random(5..20#5 except a)", "name": "b", "templateType": "anything"}, "person": {"description": "", "group": "Ungrouped variables", "definition": "random_person()", "name": "person", "templateType": "anything"}, "mark_matrix": {"description": "", "group": "Ungrouped variables", "definition": "if(b/6>a,[1,0],[0,1])", "name": "mark_matrix", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}]}], "timing": {"timeout": {"action": "none", "message": ""}, "allowPause": true, "timedwarning": {"action": "none", "message": ""}}, "name": "Money", "metadata": {"description": "

Questions to do with money.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "exam", "showQuestionGroupNames": false, "navigation": {"browse": true, "onleave": {"action": "none", "message": ""}, "showfrontpage": true, "showresultspage": "oncompletion", "preventleave": true, "reverse": true, "allowregen": true}, "percentPass": 0, "feedback": {"showtotalmark": true, "feedbackmessages": [], "showactualmark": true, "advicethreshold": 0, "intro": "", "showanswerstate": true, "allowrevealanswer": true}, "showstudentname": true, "duration": 0, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": ["geogebra", "random_person"], "custom_part_types": [], "resources": []}