// Numbas version: finer_feedback_settings {"name": "Simon's copy of Savings compound interest 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"showFeedbackIcon": true, "minValue": "P", "variableReplacements": [], "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "customName": "", "correctAnswerFraction": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "maxValue": "P", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "scripts": {}, "showFractionHint": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "mustBeReduced": false, "useCustomName": false, "marks": 1, "type": "numberentry"}], "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "customName": "", "sortAnswers": false, "showCorrectAnswer": true, "scripts": {}, "prompt": "

What is the value of $P$?

\n

£[[0]]

", "variableReplacementStrategy": "originalfirst", "unitTests": [], "useCustomName": false, "marks": 0, "type": "gapfill"}, {"showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"showFeedbackIcon": true, "minValue": "int", "variableReplacements": [], "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "customName": "", "correctAnswerFraction": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "maxValue": "int", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "scripts": {}, "showFractionHint": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "mustBeReduced": false, "useCustomName": false, "marks": 1, "type": "numberentry"}], "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "customName": "", "sortAnswers": false, "showCorrectAnswer": true, "scripts": {}, "prompt": "

What is the value of $r$?

\n

[[0]]

", "variableReplacementStrategy": "originalfirst", "unitTests": [], "useCustomName": false, "marks": 0, "type": "gapfill"}, {"showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"showFeedbackIcon": true, "minValue": "n", "variableReplacements": [], "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "customName": "", "correctAnswerFraction": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "maxValue": "n", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "scripts": {}, "showFractionHint": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "mustBeReduced": false, "useCustomName": false, "marks": 1, "type": "numberentry"}], "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "customName": "", "sortAnswers": false, "showCorrectAnswer": true, "scripts": {}, "prompt": "

What is the value of $n$?

\n

\n

[[0]]

", "variableReplacementStrategy": "originalfirst", "unitTests": [], "useCustomName": false, "marks": 0, "type": "gapfill"}, {"showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"showFeedbackIcon": true, "minValue": "A", "variableReplacements": [], "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "customName": "", "correctAnswerFraction": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "maxValue": "A", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "scripts": {}, "showFractionHint": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "mustBeReduced": false, "useCustomName": false, "marks": "2", "type": "numberentry"}], "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "customName": "", "sortAnswers": false, "showCorrectAnswer": true, "scripts": {}, "prompt": "

How much will be in the deposit account after $\\var{n}$ years? Please give your answer to the nearest penny.

\n

£[[0]]

", "variableReplacementStrategy": "originalfirst", "unitTests": [], "useCustomName": false, "marks": 0, "type": "gapfill"}, {"showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"showFeedbackIcon": true, "precisionMessage": "You have not given your answer to the correct precision.", "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "strictPrecision": false, "correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "maxValue": "A-P", "allowFractions": false, "variableReplacementStrategy": "originalfirst", "unitTests": [], "precision": "2", "marks": 1, "minValue": "A-P", "variableReplacements": [], "precisionType": "dp", "extendBaseMarkingAlgorithm": true, "customName": "Total Interest", "scripts": {}, "type": "numberentry", "showPrecisionHint": false, "mustBeReduced": false, "useCustomName": true, "showCorrectAnswer": true, "precisionPartialCredit": 0}], "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "customName": "", "sortAnswers": false, "showCorrectAnswer": true, "scripts": {}, "prompt": "

How much interest was earned in total? Give your answer to the nearest penny.

\n

£[[0]]

\n

", "variableReplacementStrategy": "originalfirst", "unitTests": [], "useCustomName": false, "marks": 0, "type": "gapfill"}], "functions": {}, "name": "Simon's copy of Savings compound interest 1", "tags": [], "extensions": [], "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "ungrouped_variables": ["n", "P", "A", "perc", "int", "ratio", "intplus"], "variables": {"A": {"definition": "precround(P*(1+int)^n,2)", "group": "Ungrouped variables", "description": "", "name": "A", "templateType": "anything"}, "intplus": {"definition": "ratio^(1/n)", "group": "Ungrouped variables", "description": "", "name": "intplus", "templateType": "anything"}, "P": {"definition": "random(1000..6000 #500)", "group": "Ungrouped variables", "description": "", "name": "P", "templateType": "anything"}, "int": {"definition": "perc/100", "group": "Ungrouped variables", "description": "", "name": "int", "templateType": "anything"}, "n": {"definition": "random(2..6 #1)", "group": "Ungrouped variables", "description": "", "name": "n", "templateType": "anything"}, "ratio": {"definition": "A/P", "group": "Ungrouped variables", "description": "", "name": "ratio", "templateType": "anything"}, "perc": {"definition": "random(1.5..5.5 #0.5)", "group": "Ungrouped variables", "description": "", "name": "perc", "templateType": "anything"}}, "rulesets": {}, "preamble": {"css": "", "js": ""}, "advice": "

The compound interest formula is: $\\ A = P(1+r)^n $

\n

\n

(a)

\n

$P$ represents the principal sum invested, so in this example it is €$\\var{P}$.

\n

\n

(b)

\n

$r$ represents the rate of compound interest, as a decimal. Since our interest rate is $\\var{100*int}$%, as a decimal this is $\\frac{\\var{100*int}}{100}=\\var{int}$

\n

\n

(c)

\n

$n$ represents the number of compounding periods, so in this example it is $\\var{n}$ years.

\n

\n

(d)

\n

Using the compound interest formula:

\n

$A=P(1+r)^n$

\n

$A=\\var{P}(1+\\var{int})^\\var{n} = \\var{P*(1+int)^n}=£\\var{A}$ to the nearest penny.

\n

\n

(e)

\n

The total interest earnt is the difference between the final amount and the principal invested. 

\n

\n

Interest = $A-P=\\var{A}-\\var{P}=£\\var{dpformat(A-P,2)}$

\n

", "metadata": {"description": "

Calculate the final amount in a savings account where compound interest is earned annually 

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

A lump sum of £$\\var{P}$ is deposited into a savings account that pays compound interest for $\\var{n}$ years at a rate of $\\var{int*100}$% per annum. If no withdrawals are made from the account, then the amount that the lump sum will have grown to is given by the compound interest formula:

\n

$\\ A = P(1+r)^n $

", "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}