// Numbas version: exam_results_page_options {"name": "number of time periods - simple interest", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "Using simple interest determine the number of days needed", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "advice": "

We are asked to find the number of time periods using simple interest. Therefore we could use the equation

\n

$S=P(1+rt)$,

\n

where $S$ is the future value, $P$ is the present value, $r$ is the interest rate per annum and $t$ is the time in years.

\n

\n

In our situation we have,

\n

$S=\\var{S}$,

\n

$P=\\var{P}$,

\n

$r=\\var{ipa}\\%=\\var{ipadec}$,

\n

and therefore we have

\n

$\\var{S}=\\var{P}(1+\\var{ipadec}t)$

\n

which we need to rearrange to solve for $t$.

\n

\n

We want to get $t$ by itself. We start by dividing both sides by $\\var{P}$ (in order to remove the multiplication by $\\var{P}$)

\n

$\\displaystyle \\frac{\\var{S}}{\\var{P}}=1+\\var{ipadec}t$

\n

Next we will subtract $1$ from both sides

\n

$\\displaystyle \\frac{\\var{S}}{\\var{P}}-1=\\var{ipadec}t$

\n

Then we will divide both sides by $\\var{ipadec}$ (in order to remove the multiplication by $\\var{ipadec}$)

\n

$\\displaystyle \\frac{\\frac{\\var{S}}{\\var{P}}-1}{\\var{ipadec}}=t$

\n

\n

\n

Calculating this we find

\n

$t\\approx\\var{years}\\quad \\text{years}$.

\n

Since we are asked for the number of days we multiply by $365$

\n

$\\text{number of days}\\approx \\var{days}$

\n

but we don't round this in the traditional sense since we require an entire time period to elapse for the interest to be paid, therefore we always round up to the nearest whole number.

\n

That is, we need to wait $\\var{daysrounded}$ days.

", "extensions": [], "preamble": {"js": "", "css": ""}, "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.

", "variables": {"days": {"definition": "years*365", "name": "days", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "daysrounded": {"definition": "ceil(days)", "name": "daysrounded", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "period": {"definition": "['days', 365]", "name": "period", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "ipa": {"definition": "ipadec*100", "name": "ipa", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "P": {"definition": "random(1000..100000#1000)", "name": "P", "templateType": "anything", "description": "

present value

", "group": "Ungrouped variables"}, "years": {"definition": "(S/P-1)/ipadec", "name": "years", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "ipadec": {"definition": "random(0.04..0.10#0.001)", "name": "ipadec", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "S": {"definition": "precround(P*(1+(ipadec+random(-0.03..0.03))*random(30..365)/365),0)", "name": "S", "templateType": "anything", "description": "", "group": "Ungrouped variables"}}, "functions": {}, "name": "number of time periods - simple interest", "tags": [], "rulesets": {}, "ungrouped_variables": ["P", "S", "ipadec", "ipa", "period", "years", "days", "daysrounded"], "parts": [{"sortAnswers": false, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "customName": "", "unitTests": [], "prompt": "

You deposit $\\$\\var{P}$into a bank account with a simple interest rate of$\\var{ipa}\\%$per annum. How many days will it take for the balance to be at least$\\$\\var{S}$?

\n

\n

[[0]]  days

", "type": "gapfill", "scripts": {}, "customMarkingAlgorithm": "", "gaps": [{"variableReplacements": [], "extendBaseMarkingAlgorithm": true, "minValue": "daysrounded", "customName": "", "unitTests": [], "correctAnswerStyle": "plain", "type": "numberentry", "correctAnswerFraction": false, "scripts": {}, "customMarkingAlgorithm": "", "maxValue": "daysrounded", "mustBeReduced": false, "mustBeReducedPC": 0, "showFeedbackIcon": true, "showFractionHint": true, "useCustomName": false, "variableReplacementStrategy": "originalfirst", "marks": 1, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "allowFractions": false}], "showFeedbackIcon": true, "useCustomName": false, "variableReplacementStrategy": "originalfirst", "marks": 0, "showCorrectAnswer": true}], "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}