// Numbas version: exam_results_page_options {"showstudentname": true, "question_groups": [{"pickQuestions": 1, "pickingStrategy": "all-ordered", "name": "Group", "questions": [{"name": "Rounding and estimating calculations - adding up prices in a shop", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": 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 Rounded up £{p[0]} £{p[1]} £{ice_cream} {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}, "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/"}], "rulesets": {}, "functions": {}, "ungrouped_variables": ["item", "name", "percentage", "name2", "oldprice", "newprice"], "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"}, "type": "question", "variable_groups": [], "advice": "

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

\n

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

\n

{name} 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 {name}

\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}\

", "statement": "

{name} and {name2} are friends. {name} 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}.

", "preamble": {"css": "", "js": ""}, "tags": ["decrease", "percentages", "taxonomy"], "parts": [{"variableReplacementStrategy": "originalfirst", "prompt": "

When {name} 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": [{"variableReplacementStrategy": "originalfirst", "maxValue": "oldprice", "precision": "2", "scripts": {}, "correctAnswerStyle": "plain", "strictPrecision": false, "type": "numberentry", "marks": "2", "precisionMessage": "You have not given your answer to the correct precision.", "correctAnswerFraction": false, "precisionType": "dp", "allowFractions": false, "showPrecisionHint": true, "minValue": "oldprice", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "precisionPartialCredit": 0, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true}], "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "scripts": {}}], "variables": {"newprice": {"templateType": "anything", "description": "", "name": "newprice", "group": "Ungrouped variables", "definition": "precround(oldprice*(100-percentage)/100,2)"}, "name2": {"templateType": "anything", "description": "

A female name.

", "name": "name2", "group": "Ungrouped variables", "definition": "random(\"Emily\", \"Kate\", \"Michaela\", \"Susan\", \"Sophie\")"}, "name": {"templateType": "anything", "description": "

A male name.

", "name": "name", "group": "Ungrouped variables", "definition": "random(\"Josh\", \"Adam\", \"Mike\", \"Trevor\", \"Alex\")"}, "oldprice": {"templateType": "anything", "description": "", "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)"}, "percentage": {"templateType": "anything", "description": "

Discount percentage.

", "name": "percentage", "group": "Ungrouped variables", "definition": "random(5..30)"}, "item": {"templateType": "anything", "description": "

The bought item.

", "name": "item", "group": "Ungrouped variables", "definition": "random(\"TV\", \"laptop\", \"smartphone\", \"PC\", \"gaming console\")"}}, "variablesTest": {"maxRuns": "1000", "condition": "precround(precround(oldprice*(100-percentage)/100,2)*100/(100-percentage),2) = oldprice"}}, {"name": "Calculating a simple rate of pay", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": 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": "

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

We are told that {name} 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 {name} 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 {name} 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": {}, "variables": {"person": {"name": "person", "group": "A person", "definition": "random_person()", "description": "

A random person

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

Number of weeks person works for

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

amount person gets paid

", "templateType": "anything"}, "name": {"name": "name", "group": "A person", "definition": "person[\"name\"]", "description": "", "templateType": "anything"}, "they": {"name": "they", "group": "A person", "definition": "person[\"pronouns\"][\"they\"]", "description": "", "templateType": "anything"}, "their": {"name": "their", "group": "A person", "definition": "person[\"pronouns\"][\"their\"]", "description": "", "templateType": "anything"}, "theirs": {"name": "theirs", "group": "A person", "definition": "person[\"pronouns\"][\"theirs\"]", "description": "", "templateType": "anything"}, "s": {"name": "s", "group": "A person", "definition": "if(person[\"gender\"]=\"neutral\",\"\",\"s\")", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["payment", "weeks"], "variable_groups": [{"name": "A person", "variables": ["person", "name", "they", "their", "theirs", "s"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

How much does {name} get paid per week?

\n

£[[0]]/week

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{payment}/{weeks}", "maxValue": "{payment}/{weeks}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}]}, {"name": "Simple interest", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": 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}]}]}], "showQuestionGroupNames": false, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Some questions of relevance to consumers.

"}, "feedback": {"allowrevealanswer": true, "showanswerstate": true, "showactualmark": true, "feedbackmessages": [], "intro": "", "advicethreshold": 0, "showtotalmark": true}, "percentPass": 0, "name": "Neil's copy of Consumer mathematics", "duration": 0, "timing": {"timeout": {"message": "", "action": "none"}, "timedwarning": {"message": "", "action": "none"}, "allowPause": true}, "navigation": {"browse": true, "showfrontpage": true, "showresultspage": "oncompletion", "preventleave": true, "allowregen": true, "onleave": {"message": "", "action": "none"}, "reverse": true}, "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": []}