// Numbas version: exam_results_page_options {"name": "Consumer Arithmetic - Calculate the original price before a decrease", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Consumer Arithmetic - Calculate the original price before a decrease", "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": {}, "extensions": [], "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", "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/"}]}]}], "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/"}]}