// Numbas version: exam_results_page_options {"name": "Annuity", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["int", "R", "n", "ans", "ans_dec"], "name": "Annuity", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

\\[A=R\\left[\\frac{(1+i)^n-1}{i}\\right].\\]

\n

Using the figures given in the question,

\n

\\[A=\\var{R}\\left[\\frac{(1+\\var{int})^{\\var{n}}-1}{\\var{int}}\\right]=\\var{ans}\\]

\n

Rounding to the nearest cent we get {ans_dec}.

\n

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

Given that $R=\\var{R}$, $i=\\var{int}$ and $n=\\var{n}$, find $A$ correct to two decimal places.

\n

$A=$[[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "({R}*((1+{int})^{n}-1)/{int})+0.02", "strictPrecision": false, "minValue": "({R}*((1+{int})^{n}-1)/{int})-0.02", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": "100", "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": "2", "showPrecisionHint": false, "type": "numberentry"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "

The following is an annuity formula \\[A=R\\left[\\frac{(1+i)^n-1}{i}\\right].\\]

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"int": {"definition": "random(0.02..0.07#0.01)", "templateType": "randrange", "group": "Ungrouped variables", "name": "int", "description": ""}, "ans_dec": {"definition": "precround(ans,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans_dec", "description": ""}, "R": {"definition": "random(100..2000#100)", "templateType": "randrange", "group": "Ungrouped variables", "name": "R", "description": ""}, "ans": {"definition": "(R*((1+int)^n-1)/{int})", "templateType": "anything", "group": "Ungrouped variables", "name": "ans", "description": ""}, "n": {"definition": "random(3..10#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "n", "description": ""}}, "metadata": {"description": "

Annuity question as a filling in a formulae exercise

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}