// Numbas version: exam_results_page_options {"showstudentname": true, "duration": 0, "question_groups": [{"pickingStrategy": "all-ordered", "name": "Group", "pickQuestions": 1, "questions": [{"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": "Calculate the original price before a decrease", "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/"}], "tags": ["decrease", "percentages", "taxonomy"], "metadata": {"description": "

Find the original price before a discount by dividing the new price by the percentage discount.

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

{name1} and {name2} are friends. {name1} noticed {name2}'s new {item} when he came over to visit her house. He immediately knew he wanted to buy the same model. When he got home, he bought the {item} online for £{newprice}.

", "advice": "

We need to find the original price paid by {name2}. This value represents 100%.

\n

By the time {name1} bought the {item}, the price had decreased by {percentage}%.

\n

{name1} therefore paid {100-percentage}% of the price {name2} paid.

\n

\n

We use the unitary method to find the original price. We know the price paid by {name1}.

\n

\\[\\var{100-percentage}\\text{%} = \\var{newprice} \\text{.}\\]

\n

Divide both sides by {100-percentage} to get

\n

\\[\\begin{align} 1\\text{%} &= \\var{newprice} \\div \\var{100-percentage} \\\\&= \\var{newprice/(100-percentage)} \\text{.} \\end{align}\\]

\n

Multiply both sides by 100 to get

\n

\\[\\begin{align} 100\\text{%} &= \\var{newprice/(100-percentage)} \\times 100 \\\\&= \\var{newprice/(100-percentage)*100} \\\\&= \\var{oldprice}\\text{.} \\end{align}\\]

\n

This is the original price paid by {name2} before the {percentage}% decrease.

\n

We can check our answer with a different method.

\n

\\[\\begin{align} \\var{100-percentage}\\text{% of } \\var{oldprice} &= \\var{(100-percentage)/100} \\times \\var{oldprice} \\\\&=  \\var{(100-percentage)/100*oldprice} \\\\&= \\var{precround((100-percentage)/100*oldprice, 2)}  \\text{.} \\end{align}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"newprice": {"name": "newprice", "group": "Ungrouped variables", "definition": "precround(oldprice*(100-percentage)/100,2)", "description": "", "templateType": "anything", "can_override": false}, "name2": {"name": "name2", "group": "Ungrouped variables", "definition": "random(\"Emily\", \"Kate\", \"Michaela\", \"Susan\", \"Sophie\")", "description": "

A female name.

", "templateType": "anything", "can_override": false}, "name1": {"name": "name1", "group": "Ungrouped variables", "definition": "random(\"Josh\", \"Adam\", \"Mike\", \"Trevor\", \"Alex\")", "description": "

A male name.

", "templateType": "anything", "can_override": false}, "oldprice": {"name": "oldprice", "group": "Ungrouped variables", "definition": "switch(\n item = \"TV\", random(179.99..1199.99 #10), \n item = \"laptop\", random(209.99..799.99 #10),\n item = \"smartphone\", random(109.99..799.99 #10),\n item = \"PC\", random(209.99..969.99 #10),\n item = \"gaming console\", random(89.99..349.99 #10),\n 399.99)", "description": "", "templateType": "anything", "can_override": false}, "percentage": {"name": "percentage", "group": "Ungrouped variables", "definition": "random(5..30)", "description": "

Discount percentage.

", "templateType": "anything", "can_override": false}, "item": {"name": "item", "group": "Ungrouped variables", "definition": "random(\"TV\", \"laptop\", \"smartphone\", \"PC\", \"gaming console\")", "description": "

The bought item.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "precround(precround(oldprice*(100-percentage)/100,2)*100/(100-percentage),2) = oldprice", "maxRuns": "1000"}, "ungrouped_variables": ["item", "name1", "percentage", "name2", "oldprice", "newprice"], "variable_groups": [], "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": "

When {name1} told {name2} how much he had paid for the {item}, {name2} said the price had decreased by {percentage}% since she bought it.

\n

How much did {name2} pay for the {item}?

\n

£  [[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "oldprice", "maxValue": "oldprice", "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}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"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": "Simple interest", "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": "

Calculate the interest accrued in a savings account, given the initial balance and annual interest rate.

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

Suppose you put £{money} into a savings account exactly {years} years ago and you haven't touched the money since. The simple interest rate on the account is {perc2}% per year.

", "variables": {"perc2": {"name": "perc2", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(0..2.5 #0.05)"}, "money": {"name": "money", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(100..5000 #100)"}, "years": {"name": "years", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(2..6)"}}, "tags": ["interests", "percentages", "taxonomy"], "ungrouped_variables": ["perc2", "money", "years"], "functions": {}, "preamble": {"js": "", "css": ""}, "advice": "

This is simple interest, which means the amount added each year is a percentage of the original amount. The amount we add is fixed for all {years} years.

\n

First, we work out the amount of interest for one year:

\n

\\begin{align}
\\var{perc2} \\text{% of } \\var{money} &= \\frac{\\var{perc2}}{100} \\times \\var{money} \\\\
&= \\var{perc2/100} \\times \\var{money} \\\\
&= £\\var{dpformat(perc2/100*money,2)} \\text{.} 
\\end{align}

\n

The money has been in the account for {years} years, so we multiply $£\\var{dpformat(perc2/100*money,2)}$ by $\\var{years}$.

\n

\\[ £\\var{dpformat(perc2/100*money,2)} \\times \\var{years} = £\\var{dpformat(perc2/100*money*years,2)} \\text{.} \\]

\n

Adding this to the original balance:

\n

\\[ £\\var{money} + £\\var{dpformat(perc2/100*money*years,2)}  = £\\var{dpformat(perc2/100*money*years + money,2)} \\text{.} \\]

\n

This is the amount we would get if we withdrew the whole savings balance today.

", "type": "question", "variable_groups": [], "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"scripts": {}, "showCorrectAnswer": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "precision": "2", "variableReplacements": [], "mustBeReducedPC": 0, "precisionPartialCredit": 0, "minValue": "(1 + perc2/100*years)*money", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "precisionType": "dp", "scripts": {}, "maxValue": "(1 + perc2/100*years)*money", "showCorrectAnswer": false, "strictPrecision": true, "type": "numberentry", "showPrecisionHint": true, "mustBeReduced": false, "marks": "2", "showFeedbackIcon": true, "precisionMessage": "You have not given your answer to the correct precision."}], "type": "gapfill", "marks": 0, "prompt": "

 If you were to withdraw the money from this account now, how much would you have?

\n

£ [[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true}]}]}], "feedback": {"allowrevealanswer": true, "feedbackmessages": [], "intro": "", "showactualmark": true, "showtotalmark": true, "showanswerstate": true, "advicethreshold": 0}, "showQuestionGroupNames": false, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Some questions of relevance to consumers.

"}, "name": "Neil's copy of Consumer mathematics", "timing": {"timedwarning": {"message": "", "action": "none"}, "timeout": {"message": "", "action": "none"}, "allowPause": true}, "percentPass": 0, "navigation": {"browse": true, "onleave": {"message": "", "action": "none"}, "allowregen": true, "showfrontpage": true, "reverse": true, "preventleave": true, "showresultspage": "oncompletion"}, "type": "exam", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Neil Anderson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2916/"}], "extensions": ["random_person"], "custom_part_types": [], "resources": []}