// Numbas version: finer_feedback_settings {"name": "Find the percentage increase or decrease", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Find the percentage increase or decrease", "tags": [], "metadata": {"description": "

Lets a student practice finding percentage changes.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "

a)

\n

We first find by how much (in euro) the price of the item has decreased:

\n

\\[\\var{x_norm}-\\var{x_sale}=\\var{price_change}.\\]

\n

We then divide by the original price to find out how large the relative price change is.

\n

\\[\\frac{\\var{price_change}}{\\var{x_norm}}\\simeq\\var{price_change_proportion}.\\]

\n

We then multply by $100$ to obtain a percentage:

\n

\\[100\\times\\var{price_change_proportion}=\\var{unrounded_item_ans}...\\%.\\]

\n

Lastly, we round this result to the nearest whole number to get our final answer:

\n

\\[\\var{item_ans}\\%.\\]

\n

--------------------------

\n

b)

\n

Again, we start by finding by how much the price of a litre of petrol has increased:

\n

\\[\\var{x_new}-\\var{x_old}=\\var{petrol_change}.\\]

\n

We then divide by the original price to find out how large the relative price change is.

\n

\\[\\frac{\\var{petrol_change}}{\\var{x_old}}\\simeq\\var{petrol_change_proportion}.\\]

\n

We then multiply by $100$ to obtain a percentage:

\n

\\[100\\times\\var{petrol_change_proportion}=\\var{unrounded_petrol_ans}\\ldots\\%.\\]

\n

Lastly, we round this result to two decimal places to get our final answer:

\n

\\[\\var{petrol_ans}\\%.\\]

", "rulesets": {}, "extensions": [], "variables": {"x_norm": {"name": "x_norm", "group": "Sale", "definition": "random(50 .. 100#1)", "description": "

Normal price of item (bigger than x_sale)

", "templateType": "randrange"}, "x_sale": {"name": "x_sale", "group": "Sale", "definition": "random(ceil(x_norm/2)..ceil(4*x_norm/5))", "description": "

Sale price, less than x_norm.

", "templateType": "anything"}, "x_old": {"name": "x_old", "group": "Petrol", "definition": "random(1 .. 2#0.01)", "description": "

Old price of petrol before increase.

", "templateType": "randrange"}, "x_new": {"name": "x_new", "group": "Petrol", "definition": "random(x_old+0.05..2#0.01)", "description": "

New price of petrol after increase.

", "templateType": "anything"}, "price_change_proportion": {"name": "price_change_proportion", "group": "Sale", "definition": "price_change/x_norm", "description": "", "templateType": "anything"}, "price_change": {"name": "price_change", "group": "Sale", "definition": "x_norm-x_sale", "description": "", "templateType": "anything"}, "petrol_change": {"name": "petrol_change", "group": "Petrol", "definition": "x_new-x_old", "description": "", "templateType": "anything"}, "petrol_change_proportion": {"name": "petrol_change_proportion", "group": "Petrol", "definition": "petrol_change/x_old", "description": "", "templateType": "anything"}, "item_ans": {"name": "item_ans", "group": "Sale", "definition": "precround(100*price_change_proportion,0)", "description": "", "templateType": "anything"}, "unrounded_item_ans": {"name": "unrounded_item_ans", "group": "Sale", "definition": "precround(100*price_change_proportion,5)", "description": "", "templateType": "anything"}, "unrounded_petrol_ans": {"name": "unrounded_petrol_ans", "group": "Petrol", "definition": "precround(petrol_change_proportion*100,5)", "description": "", "templateType": "anything"}, "petrol_ans": {"name": "petrol_ans", "group": "Petrol", "definition": "precround(unrounded_petrol_ans,2)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Sale", "variables": ["x_norm", "x_sale", "price_change_proportion", "price_change", "item_ans", "unrounded_item_ans"]}, {"name": "Petrol", "variables": ["x_new", "x_old", "petrol_change", "petrol_change_proportion", "unrounded_petrol_ans", "petrol_ans"]}], "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": "

An item is usually sold for {currency(x_norm,\"€\",\"\")} but is on sale for {currency(x_sale,\"€\",\"\")}. Find the percentage reduction in price. Enter your answer as a percentage (rounded to the nearest whole number):

\n

[[0]]$\\%$

\n

", "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": "100*(x_{norm}-x_sale)/(x_norm)", "maxValue": "100*(x_norm-x_sale)/(x_norm)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "0", "precisionPartialCredit": "75", "precisionMessage": "You have not given your answer to the correct precision. Please round your answer to the nearest whole number.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "

Due to a supply shortage, the price of petrol increases from {currency(x_old,\"€\",\"\")} per litre to {currency(x_new,\"€\",\"\")}. Find the percentage increase in price. Enter your answer as a percentage (rounded to two decimal places):

\n

[[0]]$\\%$

", "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": "100*(x_new-x_old)/(x_old)", "maxValue": "100*(x_new-x_old)/(x_old)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": "40", "precisionMessage": "You have not given your answer to the correct precision. Please give your answer to two decimal places.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Mike Welby", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/10543/"}]}]}], "contributors": [{"name": "Mike Welby", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/10543/"}]}