// Numbas version: exam_results_page_options {"metadata": {"description": "

Some questions of relevance to consumers.

", "licence": "Creative Commons Attribution 4.0 International"}, "showstudentname": true, "showQuestionGroupNames": false, "name": "Consumer Arithmetic - Quiz", "question_groups": [{"pickingStrategy": "all-ordered", "pickQuestions": 1, "name": "Group", "questions": [{"name": "Consumer Arithmetic - 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/"}, {"name": "Paul Hancock", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1738/"}], "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.

", "tags": [], "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],\"\\$\",\"c\")} and {currency(p[1],\"\\$\",\"c\")}. \n Just before checkout, you notice a tasty {flavour} ice cream on the shelf. It costs {currency(ice_cream,\"\\$\",\"c\")}. Can you put this in your basket without going over your limit?

", "functions": {"pounds": {"language": "jme", "type": "string", "definition": "if(n>=1,currency(n,\"\u00a3\",\"\"), \"\u00a3\"+dpformat(n,2))", "parameters": [["n", "number"]]}}, "ungrouped_variables": [], "preamble": {"js": "", "css": ""}, "rulesets": {}, "parts": [{"marks": 0, "customMarkingAlgorithm": "", "variableReplacements": [], "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]]

", "sortAnswers": false, "scripts": {}, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "type": "gapfill", "unitTests": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"marks": 0, "customMarkingAlgorithm": "", "variableReplacements": [], "matrix": ["1", "0"], "displayColumns": 0, "scripts": {}, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "maxMarks": 0, "displayType": "radiogroup", "distractors": ["", ""], "type": "1_n_2", "choices": ["

Round up.

", "

Round down.

"], "shuffleChoices": false, "minMarks": 0, "variableReplacementStrategy": "originalfirst", "unitTests": []}]}, {"marks": 0, "customMarkingAlgorithm": "", "variableReplacements": [], "prompt": "

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

\n

[[0]] \n ", "sortAnswers": false, "scripts": {}, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "type": "gapfill", "unitTests": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"customMarkingAlgorithm": "", "variableReplacements": [], "precisionPartialCredit": 0, "correctAnswerStyle": "plain", "showCorrectAnswer": true, "showFeedbackIcon": true, "mustBeReduced": false, "minValue": "total_rounded_up", "strictPrecision": false, "allowFractions": false, "type": "numberentry", "showPrecisionHint": false, "correctAnswerFraction": false, "unitTests": [], "mustBeReducedPC": 0, "marks": 1, "precisionType": "dp", "precision": "2", "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "precisionMessage": "You have not given your answer to the correct precision.", "notationStyles": ["plain", "en", "si-en"], "maxValue": "total_rounded_up"}]}, {"marks": 0, "customMarkingAlgorithm": "", "variableReplacements": [], "prompt": " Can we be sure that we have enough cash to pay for all three items? \n [[0]] ", "sortAnswers": false, "scripts": {}, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "type": "gapfill", "unitTests": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"marks": 0, "customMarkingAlgorithm": "", "variableReplacements": [], "matrix": "if(can_afford,[1,0],[0,1])", "displayColumns": 0, "scripts": {}, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "maxMarks": 0, "displayType": "radiogroup", "type": "1_n_2", "choices": [" Yes, we do have enough cash. ", " No, we may not have enough. "], "shuffleChoices": false, "minMarks": 0, "variableReplacementStrategy": "originalfirst", "unitTests": []}]}], "variable_groups": [{"name": "Randoms", "variables": ["p", "ice_cream", "total_rounded_up", "can_afford", "cash", "flavour"]}, {"name": "Answers", "variables": []}], "variablesTest": {"maxRuns": 100, "condition": ""}, "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. "}, "variables": {"can_afford": {"name": "can_afford", "group": "Randoms", "description": " Can we afford all three items? ", "definition": "random(true,false)", "templateType": "anything"}, "total_rounded_up": {"name": "total_rounded_up", "group": "Randoms", "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)", "templateType": "anything"}, "flavour": {"name": "flavour", "group": "Randoms", "description": " Flavour of the ice cream. ", "definition": "random(\"strawberry cheesecake\", \"cookie dough\", \"mint chocolate chip\", \"vanilla\", \"raspberry\", \"Neapolitan\")", "templateType": "anything"}, "ice_cream": {"name": "ice_cream", "group": "Randoms", "description": " Price of the ice cream ", "definition": "(random(100..380#10)+9)/100", "templateType": "anything"}, "p": {"name": "p", "group": "Randoms", "description": " Prices of the first two items. ", "definition": "repeat((random(30..200 #10) + random(1..9))/100,2)", "templateType": "anything"}, "cash": {"name": "cash", "group": "Randoms", "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 ", "templateType": "anything"}}, "type": "question"}, {"name": "Consumer Arithmetic - 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/"}, {"name": "Paul Hancock", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1738/"}], "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}\ ", "tags": [], "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}.

", "functions": {}, "ungrouped_variables": ["item", "name", "percentage", "name2", "oldprice", "newprice"], "preamble": {"js": "", "css": ""}, "rulesets": {}, "parts": [{"marks": 0, "customMarkingAlgorithm": "", "variableReplacements": [], "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]] ", "sortAnswers": false, "scripts": {}, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "type": "gapfill", "unitTests": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"customMarkingAlgorithm": "", "variableReplacements": [], "precisionPartialCredit": 0, "correctAnswerStyle": "plain", "showCorrectAnswer": true, "showFeedbackIcon": true, "mustBeReduced": false, "minValue": "oldprice", "strictPrecision": false, "allowFractions": false, "type": "numberentry", "showPrecisionHint": true, "correctAnswerFraction": false, "unitTests": [], "mustBeReducedPC": 0, "marks": "2", "precisionType": "dp", "precision": "2", "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "precisionMessage": "You have not given your answer to the correct precision.", "notationStyles": ["plain", "en", "si-en"], "maxValue": "oldprice"}]}], "variable_groups": [], "variablesTest": {"maxRuns": "1000", "condition": "precround(precround(oldprice*(100-percentage)/100,2)*100/(100-percentage),2) = oldprice"}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": " Find the original price before a discount by dividing the new price by the percentage discount. "}, "variables": {"name": {"name": "name", "group": "Ungrouped variables", "description": " A male name. ", "definition": "random(\"Josh\", \"Adam\", \"Mike\", \"Trevor\", \"Alex\")", "templateType": "anything"}, "percentage": {"name": "percentage", "group": "Ungrouped variables", "description": " Discount percentage. ", "definition": "random(5..30)", "templateType": "anything"}, "item": {"name": "item", "group": "Ungrouped variables", "description": " The bought item. ", "definition": "random(\"TV\", \"laptop\", \"smartphone\", \"PC\", \"gaming console\")", "templateType": "anything"}, "name2": {"name": "name2", "group": "Ungrouped variables", "description": " A female name. ", "definition": "random(\"Emily\", \"Kate\", \"Michaela\", \"Susan\", \"Sophie\")", "templateType": "anything"}, "oldprice": {"name": "oldprice", "group": "Ungrouped variables", "description": "", "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)", "templateType": "anything"}, "newprice": {"name": "newprice", "group": "Ungrouped variables", "description": "", "definition": "precround(oldprice*(100-percentage)/100,2)", "templateType": "anything"}}, "type": "question"}, {"name": "Consumer Arithmetic - Calculating a simple rate of pay", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}, {"name": "Paul Hancock", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1738/"}], "variables": {"person": {"description": " A random person ", "group": "A person", "name": "person", "templateType": "anything", "definition": "random_person()"}, "payment": {"description": " amount person gets paid ", "group": "Ungrouped variables", "name": "payment", "templateType": "anything", "definition": "random(1400,1600,1800)"}, "weeks": {"description": " Number of weeks person works for ", "group": "Ungrouped variables", "name": "weeks", "templateType": "anything", "definition": "random(5,8)"}}, "ungrouped_variables": ["payment", "weeks"], "statement": " {person['name']} gets paid a total of$\\$\\var{payment}$ at the end of {person['pronouns']['their']} summer job; {person['pronouns']['they']} work{s} for $\\var{weeks}$ weeks.

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

"}, "functions": {}, "preamble": {"js": "", "css": ""}, "variable_groups": [{"variables": ["person"], "name": "A person"}], "rulesets": {}, "advice": "

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

\n

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

\n

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

\n

Therefore {person['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.

", "parts": [{"gaps": [{"allowFractions": false, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "minValue": "{payment}/{weeks}", "scripts": {}, "variableReplacements": [], "type": "numberentry", "maxValue": "{payment}/{weeks}", "marks": 1, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "mustBeReducedPC": 0, "unitTests": [], "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false}], "extendBaseMarkingAlgorithm": true, "prompt": "

How much does {person['name']} get paid per week?

\n

$[[0]]/week ", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "type": "gapfill", "marks": 0, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "unitTests": [], "sortAnswers": false}], "tags": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "type": "question"}, {"name": "Consumer Arithmetic - 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/"}, {"name": "Paul Hancock", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1738/"}], "preamble": {"js": "", "css": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": " Calculate the interest accrued in a savings account, given the initial balance and annual interest rate. "}, "rulesets": {}, "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": {"years": {"group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything", "name": "years"}, "money": {"group": "Ungrouped variables", "definition": "random(100..5000 #100)", "description": "", "templateType": "anything", "name": "money"}, "perc2": {"group": "Ungrouped variables", "definition": "random(0..2.5 #0.05)", "description": "", "templateType": "anything", "name": "perc2"}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "functions": {}, "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.

", "parts": [{"type": "gapfill", "sortAnswers": false, "unitTests": [], "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "prompt": "

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

\n

\$ [[0]]

", "marks": 0, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "gaps": [{"type": "numberentry", "maxValue": "(1 + perc2/100*years)*money", "correctAnswerFraction": false, "mustBeReduced": false, "customMarkingAlgorithm": "", "variableReplacements": [], "showCorrectAnswer": false, "scripts": {}, "strictPrecision": true, "precisionPartialCredit": 0, "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "unitTests": [], "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "precision": "2", "correctAnswerStyle": "plain", "marks": "2", "extendBaseMarkingAlgorithm": true, "showPrecisionHint": true, "showFeedbackIcon": true, "allowFractions": false, "minValue": "(1 + perc2/100*years)*money", "precisionType": "dp"}], "scripts": {}, "showFeedbackIcon": true}], "ungrouped_variables": ["perc2", "money", "years"], "tags": [], "variable_groups": [], "type": "question"}, {"name": "Consumer Arithmetic - Successive Discounts", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Paul Hancock", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1738/"}], "statement": "

Suppose that {object} was already on sale for {discount_1}% before being discounted a further {discount_2}% during an end of financial year sale at {store}.

", "parts": [{"minMarks": 0, "choices": ["

Yes

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

Would the sale price be different if the discounts had been switched?

", "extendBaseMarkingAlgorithm": true}, {"minMarks": 0, "choices": ["

{discount_1+discount_2}

", "

{max(discount_1,discount_2)-min(discount_1,discount_2)}

", "

{precround(((1-discount_1/100)-discount_2/100*(1-discount_1/100))*100,0)}

", "

{100-(max(discount_1,discount_2)-min(discount_1,discount_2))}

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

The overall discount would be closest to a single discount of:

", "extendBaseMarkingAlgorithm": true}], "rulesets": {}, "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["discount_1", "discount_2", "objects", "object", "stores", "store"], "advice": "", "tags": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "functions": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variables": {"discount_1": {"description": "", "name": "discount_1", "templateType": "anything", "definition": "random(1..100)", "group": "Ungrouped variables"}, "discount_2": {"description": "", "name": "discount_2", "templateType": "anything", "definition": "random(1..100)", "group": "Ungrouped variables"}, "objects": {"description": "", "name": "objects", "templateType": "anything", "definition": "[\"a TV\", \"a Fridge\", \"a PS4\", \"an XBox\", \"an iPhoneX\"]", "group": "Ungrouped variables"}, "stores": {"description": "", "name": "stores", "templateType": "anything", "definition": "[\"JBHIFI\", \"David Jones\", \"2nd's World\"]", "group": "Ungrouped variables"}, "object": {"description": "", "name": "object", "templateType": "anything", "definition": "shuffle(objects)[1]", "group": "Ungrouped variables"}, "store": {"description": "", "name": "store", "templateType": "anything", "definition": "shuffle(stores)[1]", "group": "Ungrouped variables"}}, "variable_groups": [], "type": "question"}]}], "timing": {"allowPause": true, "timeout": {"message": "", "action": "none"}, "timedwarning": {"message": "", "action": "none"}}, "feedback": {"showtotalmark": true, "advicethreshold": 0, "intro": "", "showanswerstate": true, "allowrevealanswer": true, "feedbackmessages": [], "showactualmark": true}, "duration": 0, "percentPass": "80", "navigation": {"preventleave": true, "showfrontpage": true, "browse": true, "allowregen": true, "reverse": true, "onleave": {"message": "", "action": "none"}, "showresultspage": "oncompletion"}, "type": "exam", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Paul Hancock", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1738/"}], "extensions": ["random_person"], "custom_part_types": [], "resources": []}