// Numbas version: finer_feedback_settings {"name": "Simple interest", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "
Calculate the interest accrued in a savings account, given the initial balance and annual interest rate.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Suppose you put £{money} into a savings account exactly {years} years ago and you haven't touched the money since. The simple interest rate on the account is {perc2}% per year.
", "variables": {"perc2": {"name": "perc2", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(0..2.5 #0.05)"}, "money": {"name": "money", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(100..5000 #100)"}, "years": {"name": "years", "group": "Ungrouped variables", "templateType": "anything", "description": "", "definition": "random(2..6)"}}, "tags": ["interests", "percentages", "taxonomy"], "ungrouped_variables": ["perc2", "money", "years"], "functions": {}, "name": "Simple interest", "preamble": {"js": "", "css": ""}, "extensions": [], "advice": "This is simple interest, which means the amount added each year is a percentage of the original amount. The amount we add is fixed for all {years} years.
\nFirst, we work out the amount of interest for one year:
\n\\begin{align}
\\var{perc2} \\text{% of } \\var{money} &= \\frac{\\var{perc2}}{100} \\times \\var{money} \\\\
&= \\var{perc2/100} \\times \\var{money} \\\\
&= £\\var{dpformat(perc2/100*money,2)} \\text{.}
\\end{align}
The money has been in the account for {years} years, so we multiply $£\\var{dpformat(perc2/100*money,2)}$ by $\\var{years}$.
\n\\[ £\\var{dpformat(perc2/100*money,2)} \\times \\var{years} = £\\var{dpformat(perc2/100*money*years,2)} \\text{.} \\]
\nAdding this to the original balance:
\n\\[ £\\var{money} + £\\var{dpformat(perc2/100*money*years,2)} = £\\var{dpformat(perc2/100*money*years + money,2)} \\text{.} \\]
\nThis is the amount we would get if we withdrew the whole savings balance today.
", "type": "question", "variable_groups": [], "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"scripts": {}, "showCorrectAnswer": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "precision": "2", "variableReplacements": [], "mustBeReducedPC": 0, "precisionPartialCredit": 0, "minValue": "(1 + perc2/100*years)*money", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "precisionType": "dp", "scripts": {}, "maxValue": "(1 + perc2/100*years)*money", "showCorrectAnswer": false, "strictPrecision": true, "type": "numberentry", "showPrecisionHint": true, "mustBeReduced": false, "marks": "2", "showFeedbackIcon": true, "precisionMessage": "You have not given your answer to the correct precision."}], "type": "gapfill", "marks": 0, "prompt": "If you were to withdraw the money from this account now, how much would you have?
\n£ [[0]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true}], "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/"}], "resources": []}]}], "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/"}]}