// Numbas version: exam_results_page_options {"name": "Compound interest from table", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Compound interest from table", "tags": [], "metadata": {"description": "

Data from a compound interest are shown in a table. Students are asked to compute the value of an investment, and to identify the type of graph.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

A principal amount of \\${principal} was invested for {periods} {timeperiods[timeidx]}s at an interest rate of {rate}% per annum.

\n

The following table shows the amount that \\$1000 invested under the same scheme would be worth at the end of each {timeperiods[timeidx]}.

\n

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
{timeperiods[timeidx]}s012345678910
investment value ($)\\$1000{values[1]}{values[2]}{values[3]}{values[4]}{values[5]}{values[6]}{values[7]}{values[8]} {values[9]}{values[10]}
\n

   

", "advice": "

The value of \\$1000 invested for {periods} {timeperiods[timeidx]}s at an interest rate of {rate}% per annum is \\${round((1000 * (1 + eff_rate/100)^periods)*100)/100}.

\n

\n

The principal actually invested was {principal / 1000} times this investment, so we need to multiply this value by {principal / 1000}.

\n

{principal / 1000} $\\times$ \\${round((1000 (1 + eff_rate/100)^periods)*100)/100} = \\${(principal / 1000) * round(1000*((1 + eff_rate/100)^periods)*100)/100}.

\n

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"rate": {"name": "rate", "group": "Ungrouped variables", "definition": "random(1..10)", "description": "", "templateType": "anything", "can_override": false}, "timeperiods": {"name": "timeperiods", "group": "Ungrouped variables", "definition": "['day','month','quarter','year']", "description": "", "templateType": "anything", "can_override": false}, "timeidx": {"name": "timeidx", "group": "Ungrouped variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}, "principal": {"name": "principal", "group": "Ungrouped variables", "definition": "random(1..10)*1000", "description": "", "templateType": "anything", "can_override": false}, "periods": {"name": "periods", "group": "Ungrouped variables", "definition": "random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "effective_rates": {"name": "effective_rates", "group": "Ungrouped variables", "definition": "[rate/365,rate/12,rate/4,rate]", "description": "", "templateType": "anything", "can_override": false}, "eff_rate": {"name": "eff_rate", "group": "Ungrouped variables", "definition": "effective_rates[timeidx]", "description": "", "templateType": "anything", "can_override": false}, "values": {"name": "values", "group": "Ungrouped variables", "definition": "['$1000',\n currency(round((1000 * (1 + eff_rate/100))*100)/100,\"$\",\"\"),\n currency(round((1000 * (1 + eff_rate/100)^2)*100)/100,\"$\",\"\"),\n currency(round((1000 * (1 + eff_rate/100)^3)*100)/100,\"$\",\"\"),\n currency(round((1000 * (1 + eff_rate/100)^4)*100)/100,\"$\",\"\"),\n currency(round((1000 * (1 + eff_rate/100)^5)*100)/100,\"$\",\"\"),\n currency(round((1000 * (1 + eff_rate/100)^6)*100)/100,\"$\",\"\"),\n currency(round((1000 * (1 + eff_rate/100)^7)*100)/100,\"$\",\"\"),\n currency(round((1000 * (1 + eff_rate/100)^8)*100)/100,\"$\",\"\"),\n currency(round((1000 * (1 + eff_rate/100)^9)*100)/100,\"$\",\"\"),\n currency(round((1000 * (1 + eff_rate/100)^10)*100)/100,\"$\",\"\")\n ]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["rate", "timeperiods", "timeidx", "principal", "periods", "effective_rates", "eff_rate", "values"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What would the \\${principal} investment be worth at the end of {periods} {timeperiods[timeidx]}s?

\n

Give your answer to the nearest cent. Do not enter the dollar sign.

", "minValue": "{(principal / 1000) * round(1000*((1 + eff_rate/100)^periods)*100)/100}", "maxValue": "{(principal / 1000) * round(1000*((1 + eff_rate/100)^periods)*100)/100}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

If these data were plotted, what type of graph would they lie on?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["exponential", "parabola", "hyperbola", "straight line"], "matrix": ["1", 0, 0, 0], "distractors": ["", "", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}