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