// Numbas version: exam_results_page_options {"name": "Ida's copy of Cumulative percent decrease", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Ida's copy of Cumulative percent decrease", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Given the original price of a smartphone and the rate at which it decreases, calculate its price after a given number of months. In the second part, calculate the time remaining until the price goes below a certain point.

"}, "parts": [{"prompt": "

Hvor mye koster smartphonen etter $1$ måned?

\n

Svar: [[0]]

", "marks": 0, "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "gapfill", "variableReplacements": [], "steps": [{"prompt": "

The original price of the phone is $£\\var{price}$ and we are told that the price decreases by $\\var{perc}$% every month.

\n

", "marks": 0, "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "information", "variableReplacements": [], "scripts": {}, "variableReplacementStrategy": "originalfirst"}, {"correctAnswerFraction": false, "marks": "0.5", "showFeedbackIcon": true, "prompt": "

What is the decimal multiplier for the decrease in the smartphones each month?

", "correctAnswerStyle": "plain", "maxValue": "1-{perc}/100", "scripts": {}, "type": "numberentry", "variableReplacements": [], "minValue": "1-{perc}/100", "mustBeReducedPC": 0, "showCorrectAnswer": true, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacementStrategy": "originalfirst"}, {"marks": "0.5", "allowFractions": false, "precision": "2", "correctAnswerStyle": "plain", "maxValue": "{price}*(1-{perc}/100)", "precisionMessage": "

Round your answer to $2$ decimal places.

", "scripts": {}, "variableReplacements": [], "precisionType": "dp", "mustBeReduced": false, "correctAnswerFraction": false, "showFeedbackIcon": true, "prompt": "

Multiply the original price by the decimal multiplier to obtain the price after 1 month.

", "type": "numberentry", "showPrecisionHint": true, "minValue": "{price}*(1-{perc}/100)", "mustBeReducedPC": 0, "showCorrectAnswer": true, "strictPrecision": false, "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "notationStyles": ["plain", "en", "si-en"]}], "gaps": [{"correctAnswerFraction": false, "marks": "2", "allowFractions": false, "precision": "1", "type": "numberentry", "correctAnswerStyle": "plain", "maxValue": "precround(price*((100-perc)/100), 2)", "precisionMessage": "

Avrundning til $1$ desimal.

", "scripts": {}, "precisionPartialCredit": 0, "showPrecisionHint": true, "variableReplacements": [], "minValue": "precround(price*((100-perc)/100), 2)", "mustBeReducedPC": 0, "showCorrectAnswer": true, "strictPrecision": false, "showFeedbackIcon": true, "precisionType": "dp", "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacementStrategy": "originalfirst"}], "scripts": {}, "stepsPenalty": 0, "variableReplacementStrategy": "originalfirst"}, {"prompt": "

Hvor mye koster smartphonen etter $5$ måneder?

\n

Uppställning av uträkningen: 

\n

Svar: [[0]]

", "marks": 0, "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "gapfill", "variableReplacements": [], "steps": [{"prompt": "

The original price of the phone is $£\\var{price}$ and we are told that the price decreases by $\\var{perc}$% every month.

\n

", "marks": 0, "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "information", "variableReplacements": [], "scripts": {}, "variableReplacementStrategy": "originalfirst"}, {"correctAnswerFraction": false, "marks": "0.5", "showFeedbackIcon": true, "prompt": "

What is the decimal multiplier for the decrease in the smartphones each month?

", "correctAnswerStyle": "plain", "maxValue": "1-{perc}/100", "scripts": {}, "type": "numberentry", "variableReplacements": [], "minValue": "1-{perc}/100", "mustBeReducedPC": 0, "showCorrectAnswer": true, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacementStrategy": "originalfirst"}, {"marks": "0.5", "allowFractions": false, "precision": "2", "correctAnswerStyle": "plain", "maxValue": "{price}*(1-{perc}/100)", "precisionMessage": "

Round your answer to $2$ decimal places.

", "scripts": {}, "variableReplacements": [], "precisionType": "dp", "mustBeReduced": false, "correctAnswerFraction": false, "showFeedbackIcon": true, "prompt": "

Multiply the original price by the decimal multiplier to obtain the price after 1 month.

", "type": "numberentry", "showPrecisionHint": true, "minValue": "{price}*(1-{perc}/100)", "mustBeReducedPC": 0, "showCorrectAnswer": true, "strictPrecision": false, "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "notationStyles": ["plain", "en", "si-en"]}, {"marks": "0.5", "allowFractions": false, "precision": "2", "correctAnswerStyle": "plain", "maxValue": "{price}*(1-{perc}/100)^2", "precisionMessage": "

Round your answer to $2$ decimal places.

", "scripts": {}, "variableReplacements": [], "precisionType": "dp", "mustBeReduced": false, "correctAnswerFraction": false, "showFeedbackIcon": true, "prompt": "

Multiply your answer above by the decimal multiplier to obtain the price after 2 months. 

\n

Note that this is the same as multiplying the original price by $d^2$, where $d$ is the decimal multiplier.

", "type": "numberentry", "showPrecisionHint": true, "minValue": "{price}*(1-{perc}/100)^2", "mustBeReducedPC": 0, "showCorrectAnswer": true, "strictPrecision": false, "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "notationStyles": ["plain", "en", "si-en"]}], "gaps": [{"correctAnswerFraction": false, "marks": "2", "allowFractions": false, "precision": "1", "type": "numberentry", "correctAnswerStyle": "plain", "maxValue": "precround(price*((100-perc)/100)^5, 2)", "precisionMessage": "

Avrundning til $1$ desimal.

", "scripts": {}, "precisionPartialCredit": 0, "showPrecisionHint": true, "variableReplacements": [], "minValue": "precround(price*((100-perc)/100)^5, 2)", "mustBeReducedPC": 0, "showCorrectAnswer": true, "strictPrecision": false, "showFeedbackIcon": true, "precisionType": "dp", "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacementStrategy": "originalfirst"}], "scripts": {}, "stepsPenalty": 0, "variableReplacementStrategy": "originalfirst"}], "tags": [], "preamble": {"css": "", "js": ""}, "rulesets": {}, "advice": "

a)

\n

We can use the multiplier method to calculate the new price. If the price decreases by {perc}%, this its value is {100-perc}% of the original value after 1 month. The decimal multiplier for {100-perc}% is

\n

\\[\\frac{\\var{100-perc}}{100} = \\var{(100-perc)/100} \\text{.}\\]

\n

Each month our smartphone's value can be found by multiplying the previous month's value by the decimal multiplier. For example, after the first month, the value is

\n

\\[ \\var{(100-perc)/100} \\times\\mathrm{£}\\var{price} = \\mathrm{£}\\var{dpformat(price*(100-perc)/100,2)}\\text{.} \\]

\n

To calculate the price after 5 months, we multiply the original price of the smartphone by our multiplier 5 times:

\n

\\[ \\begin{align} \\text{Final worth} &= \\var{price} \\times \\var{(100-perc)/100} \\times \\var{(100-perc)/100} \\times \\var{(100-perc)/100} \\times \\var{(100-perc)/100} \\times \\var{(100-perc)/100} \\\\&=  \\var{price} \\times \\var{(100-perc)/100}^{5} \\\\&= £\\var{precround(price*((100-perc)/100)^5, 2)} {.} \\end{align}\\]

\n

b)

\n

From part a), the value after 5 months is  £$\\var{precround(price*((100-perc)/100)^5, 2)}$. Continuing to multiply the price by the decimal multiplier,

\n

\\[£\\var{precround(price*((100-perc)/100)^5, 2)} \\times \\var{(100-perc)/100} = £\\var{precround(precround(price*((100-perc)/100)^5, 2)*(100-perc)/100, 2)}\\]

\n

\\[£\\var{precround(price*((100-perc)/100)^5, 2)} \\times \\var{(100-perc)/100}^2 = £\\var{precround(precround(price*((100-perc)/100)^6, 2)*(100-perc)/100, 2)}\\]

\n

\\[£\\var{precround(price*((100-perc)/100)^5, 2)} \\times \\var{(100-perc)/100}^3 = £\\var{precround(precround(price*((100-perc)/100)^7, 2)*(100-perc)/100, 2)}\\]

\n

\\[£\\var{precround(price*((100-perc)/100)^5, 2)} \\times \\var{(100-perc)/100}^4 = £\\var{precround(precround(price*((100-perc)/100)^8, 2)*(100-perc)/100, 2)}\\]

\n

\n

The smartphone's value will be below $£\\var{threshold}$ after {n-5} more months ({n} months in total since its release).

", "variable_groups": [{"name": "Part a)", "variables": ["price", "perc"]}, {"name": "Part b)", "variables": ["threshold", "pricee1", "pricee2", "pricee3", "testn", "test", "price2", "n", "person"]}], "variables": {"pricee2": {"name": "pricee2", "description": "", "definition": "precround(price*((100 - perc)/100)^(testn-1),2)", "templateType": "anything", "group": "Part b)"}, "test": {"name": "test", "description": "

Calculated value of price2 to ensure we mention rounding errors in advice only when needed.

", "definition": "precround(precround(price*((100-perc)/100)^5, 2)*((100-perc)/100)^(n-5), 2)", "templateType": "anything", "group": "Part b)"}, "price": {"name": "price", "description": "

The original price.

", "definition": "random(6000..8000 #100) ", "templateType": "anything", "group": "Part a)"}, "pricee3": {"name": "pricee3", "description": "", "definition": "precround(price*((100 - perc)/100)^(testn-2),2)", "templateType": "anything", "group": "Part b)"}, "testn": {"name": "testn", "description": "

Number of months in total.

", "definition": "random(6..9)", "templateType": "anything", "group": "Part b)"}, "pricee1": {"name": "pricee1", "description": "

The resulting price after the total of testn months.

", "definition": "precround(price*((100 - perc)/100)^(testn),2)", "templateType": "anything", "group": "Part b)"}, "n": {"name": "n", "description": "", "definition": "if(pricee2 < threshold, testn-1, testn)", "templateType": "anything", "group": "Part b)"}, "perc": {"name": "perc", "description": "

Percentage decrease per month.

", "definition": "random(2..4 #0.5)", "templateType": "anything", "group": "Part a)"}, "threshold": {"name": "threshold", "description": "", "definition": "siground(pricee1+5,2)", "templateType": "anything", "group": "Part b)"}, "person": {"name": "person", "description": "", "definition": "random_person()", "templateType": "anything", "group": "Part b)"}, "price2": {"name": "price2", "description": "", "definition": "if(pricee2 < threshold, pricee2, pricee1)", "templateType": "anything", "group": "Part b)"}}, "functions": {}, "statement": "

En smartphones verdi minsker hver måned med $\\var{perc}$%. Når den lanseres koster den $\\var{price}$kr.

", "extensions": ["random_person"], "ungrouped_variables": [], "variablesTest": {"condition": "", "maxRuns": "1000"}, "type": "question", "contributors": [{"name": "Ida Landg\u00e4rds", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2336/"}]}]}], "contributors": [{"name": "Ida Landg\u00e4rds", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2336/"}]}