// Numbas version: exam_results_page_options {"name": "future value - compound interest", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "parts": [{"variableReplacementStrategy": "originalfirst", "marks": 0, "customMarkingAlgorithm": "", "customName": "", "gaps": [{"variableReplacementStrategy": "originalfirst", "precisionMessage": "You have not given your answer to the nearest cent.", "showPrecisionHint": false, "correctAnswerFraction": false, "minValue": "S", "precisionPartialCredit": 0, "type": "numberentry", "precisionType": "dp", "useCustomName": false, "customMarkingAlgorithm": "", "variableReplacements": [], "mustBeReduced": false, "marks": 1, "unitTests": [], "precision": "2", "customName": "", "correctAnswerStyle": "plain", "showCorrectAnswer": true, "mustBeReducedPC": 0, "strictPrecision": false, "notationStyles": ["plain", "en", "si-en"], "extendBaseMarkingAlgorithm": true, "maxValue": "S", "showFeedbackIcon": true, "scripts": {}, "allowFractions": false}], "showCorrectAnswer": true, "sortAnswers": false, "prompt": "

If a bank account has a balance of $\\$\\var{P}$ and it earns $\\var{ipa}\\%$ per annum compounded {period[0]}, what will be the balance of the account after $\\var{years}$ years?  

\n

\n

$\\$\\,$[[0]] (to the nearest cent)

", "extendBaseMarkingAlgorithm": true, "type": "gapfill", "showFeedbackIcon": true, "useCustomName": false, "unitTests": [], "variableReplacements": [], "scripts": {}}], "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "Using interest compounded at common time intervals (except yearly) determine the future value"}, "variable_groups": [], "ungrouped_variables": ["P", "years", "period", "n", "ipa", "ipadec", "ipp", "ippdec", "S", "Srounded"], "statement": "

If you are unsure of how to do a question, click on Reveal answers to see the full working. Then, once you understand how to do the question, click on Try another question like this one to start again. Do each question repeatedly to ensure you have mastered it.

", "functions": {}, "preamble": {"css": "", "js": ""}, "variables": {"ipa": {"group": "Ungrouped variables", "description": "

interest per annum as a percentage (add the symbol afterwards)

", "definition": "random(1..7#0.1)", "name": "ipa", "templateType": "anything"}, "ipp": {"group": "Ungrouped variables", "description": "

interest per period, only use for debugging, use fractions in display and calculations.

", "definition": "ipa/period[1]", "name": "ipp", "templateType": "anything"}, "Srounded": {"group": "Ungrouped variables", "description": "", "definition": "precround((P*(1+ippdec)^n,2))", "name": "Srounded", "templateType": "anything"}, "S": {"group": "Ungrouped variables", "description": "", "definition": "P*(1+(ipadec/period[1]))^n", "name": "S", "templateType": "anything"}, "ipadec": {"group": "Ungrouped variables", "description": "", "definition": "ipa/100", "name": "ipadec", "templateType": "anything"}, "ippdec": {"group": "Ungrouped variables", "description": "", "definition": "ipp/100", "name": "ippdec", "templateType": "anything"}, "P": {"group": "Ungrouped variables", "description": "

present value

", "definition": "random(1000..100000#1000)", "name": "P", "templateType": "anything"}, "n": {"group": "Ungrouped variables", "description": "", "definition": "years*period[1]", "name": "n", "templateType": "anything"}, "period": {"group": "Ungrouped variables", "description": "", "definition": "random([random('half-yearly','semiannually'),2],['quarterly', 4],['monthly',12],['daily', 365])", "name": "period", "templateType": "anything"}, "years": {"group": "Ungrouped variables", "description": "", "definition": "random(3..15)", "name": "years", "templateType": "anything"}}, "advice": "

We are asked to find the future value using compound interest. Therefore we will use the equation

\n

$S=P(1+i)^n$,

\n

where $S$ is the future value, $P$ is the present value, $i$ is the interest rate per time period and $n$ is the number of time periods.

\n

In our situation we have,

\n

$P=\\$\\var{P}$,

\n

$i=\\frac{\\var{ipa}\\%}{\\var{period[1]}}=\\simplify[unitDenominator]{{ipadec}/{period[1]}}$,

\n

$n=\\var{years}\\times\\var{period[1]}=\\var{n}$, 

\n

and therefore

\n

$\\begin{align}S&=\\var{P}\\left(1+\\simplify[simplifyFractions, unitDenominator]{{ipadec}/{period[1]}}\\right)^\\var{n}\\\\&=\\$ \\var{Srounded} \\text{        (to the nearest cent)}\\end{align}$ 

", "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "extensions": [], "name": "future value - compound interest", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}