// Numbas version: finer_feedback_settings {"name": "Net Present Value 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["Invest", "Return1", "perc", "int", "PV1", "n1", "num", "Return2", "n2", "PV2", "NPV", "num2"], "name": "Net Present Value 2", "tags": ["present value", "rebel", "Rebel", "REBEL", "rebelmaths"], "advice": "

We wish to calculate the net present value (NPV) of an investment that will be worth €$\\var{Return1}$ in $\\var{n1}$ years time plus an additional €$\\var{Return2}$ in $\\var{n2}$ years time. Using the present value formula, the present value of the €$\\var{Return1}$ is:

\n

$P=\\frac{A}{(1+i)^{n}}$ 

\n

where $A$ is €$\\var{Return1}$, $n$ is $\\var{n1}$ and $i$ is $\\frac{\\var{perc}}{100}=\\var{int}$

\n

$P1=\\frac{\\var{Return1}}{(1+\\var{int})^{\\var{n}}}$ 

\n

$P1=\\frac{\\var{Return1}}{\\var{num}}$ 

\n

$P1=\\var{PV1}$ 

\n

\n

Using the present value formula, the present value of the €$\\var{Return2}$ is:

\n

$P=\\frac{A}{(1+i)^{n}}$ 

\n

where $A$ is €$\\var{Return2}$, $n$ is $\\var{n2}$ and $i$ is $\\frac{\\var{perc}}{100}=\\var{int}$

\n

$P2=\\frac{\\var{Return2}}{(1+\\var{int})^{\\var{n}}}$ 

\n

$P2=\\frac{\\var{Return2}}{\\var{num}}$ 

\n

$P2=\\var{PV2}$ 

\n

The NPV of the total amount is $P1+P2-Investment=\\var{PV1}+\\var{PV2}-\\var{INVEST}=€\\var{NPV}$ 

\n

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

Calculate the net present value (NPV) of the investment given that the discount rate is $\\var{perc}$% per annum.

\n

\n

€[[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "NPV+0.1", "minValue": "NPV-0.1", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "5", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "

An investment of €$\\var{Invest}$ invested today will give a return of €$\\var{Return1}$ in $\\var{n1}$ years' time and a further return of €$\\var{Return2}$ in $\\var{n2}$ years' time. 

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"perc": {"definition": "random(2..6#0.5)", "templateType": "anything", "group": "Ungrouped variables", "name": "perc", "description": ""}, "PV1": {"definition": "precround(Return1/(1+int)^n1,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "PV1", "description": ""}, "PV2": {"definition": "precround(Return2/(1+int)^n2,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "PV2", "description": ""}, "num": {"definition": "(1+int)^n1", "templateType": "anything", "group": "Ungrouped variables", "name": "num", "description": ""}, "num2": {"definition": "(1+int)^n2", "templateType": "anything", "group": "Ungrouped variables", "name": "num2", "description": ""}, "int": {"definition": "perc/100", "templateType": "anything", "group": "Ungrouped variables", "name": "int", "description": ""}, "Invest": {"definition": "siground(Return1/(1+int+0.01)^n1, 3)+siground(Return2/(1+int+0.01)^n2, 3)", "templateType": "anything", "group": "Ungrouped variables", "name": "Invest", "description": ""}, "Return1": {"definition": "random(20000..30000#5000)", "templateType": "anything", "group": "Ungrouped variables", "name": "Return1", "description": ""}, "Return2": {"definition": "random(40000..70000#5000)", "templateType": "anything", "group": "Ungrouped variables", "name": "Return2", "description": ""}, "n1": {"definition": "random(2..4#1)", "templateType": "anything", "group": "Ungrouped variables", "name": "n1", "description": ""}, "n2": {"definition": "n1+3", "templateType": "anything", "group": "Ungrouped variables", "name": "n2", "description": ""}, "NPV": {"definition": "(PV1+PV2)- INVEST", "templateType": "anything", "group": "Ungrouped variables", "name": "NPV", "description": ""}}, "metadata": {"description": "

An investment of x invested today will give a return of €y in n1 years time and a further €z n2 years from today. Calculate the net present value (NPV) of the investment given that the discount rate is perc% per annum.

\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/"}], "resources": []}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}