// Numbas version: finer_feedback_settings {"name": "NA Simple interest vs compound interest (10+)", "extensions": [], "custom_part_types": [], "resources": [["question-resources/Compound_interest_formula.png", "Compound_interest_formula.png"], ["question-resources/Simple_interest_formula.png", "Simple_interest_formula.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "NA Simple interest vs compound interest (10+)", "tags": ["LANTITE", "Western Sydney MESH"], "metadata": {"description": "
Used for LANTITE preparation (Australia). NA = Number & Algebra strand. Students must do a simple interest calculation (geven principal, rate and months, all of which are randomly generated) then subtract their answer from the supplied compound interest amount to find the difference.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "\n\nSimple interest can be calculated using the formula
\n$\\begin{aligned} I &= P \\times r \\times n \\end{aligned}$
\nCompound interest can be calculated using the formulae
\n\n$ A = P \\times (1+r)^n$ and $ I = A - P $
\nwhere for all formulae:
\n$\\begin{aligned} \\quad I \\quad & \\text{is the interest earned,} \\\\ \\quad P \\quad & \\text{is the principal,} \\\\ \\quad r \\quad & \\text{is the interest rate per time period (as a decimal),} \\\\ \\quad n \\quad & \\text{is the number of time periods,} \\\\ \\quad A \\quad & \\text{is the final amount.} \\end{aligned}$
", "advice": "\n\nSimple interest:
\n$P = \\$ \\var{formatnumber(principal,'si-en')}$
\n$\\begin{aligned} r &= \\var{rate} ÷ 100 \\\\ &= \\var{rate/100} \\end{aligned}$
\n$\\begin{aligned} n &= \\var{months} ÷ 12 \\\\ &= \\var{months ÷12} \\text{ years} \\end{aligned}$
\n$\\begin{aligned} I &= P \\times r \\times n \\\\ &= \\$ \\var{formatnumber(principal,'si-en')} \\times \\var{rate/100} \\times \\var{months ÷ 12} \\\\&= \\$ \\var{trim(dpformat(simpleinterest,2,'si-en'))} \\end{aligned}$
\nThe simple interest is \\$ {trim(dpformat(simpleinterest,2,'si-en'))} to the nearest cent.
\n\nCompound interest was given as \\${trim(dpformat({compoundinterest},2,\"si-en\"))}
\n\n
How much less:
\nThe question asked how much less interest {name1} would have earnt if simple interest had been calculated.
\nCompound interest - simple interest
\n$\\begin{aligned} &= \\$ \\var{trim(dpformat({compoundinterest},2,\"si-en\"))} - \\$ \\var {trim(dpformat(simpleinterest,2,'si-en'))} \\\\ &= \\$ \\var{trim(dpformat((precround(compoundinterest,2)-precround(simpleinterest,2)),2,'si-en'))} \\end{aligned}$
\nRounded to the nearest dollar, {name1} would have earnt \\${answer} less from the simple interest compared to the compound interest.
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"principal": {"name": "principal", "group": "Ungrouped variables", "definition": "random(3000 .. 50000#1000)", "description": "\n\n\n\n\nThe amount invested.
", "templateType": "randrange", "can_override": false}, "months": {"name": "months", "group": "Ungrouped variables", "definition": "random(6 .. 42#3)", "description": "\n\n\n\n\nThe period of the investment, in months.
", "templateType": "randrange", "can_override": false}, "answer": {"name": "answer", "group": "Ungrouped variables", "definition": "precround(compoundinterest-simpleinterest,0)", "description": "\n\n\n\n\n\n\n\nThe final answer (difference between compound and simple interest). It's rounded to the nearest dollar.
", "templateType": "anything", "can_override": false}, "amount": {"name": "amount", "group": "Ungrouped variables", "definition": "principal*(1+(rate/4)/100)^(months/3)", "description": "\n\n\n\n\n\n\n\n\n\n\n\nThe exact value of the Amount in the compound interest formula.
", "templateType": "anything", "can_override": false}, "simpleinterest": {"name": "simpleinterest", "group": "Ungrouped variables", "definition": "principal*rate*months/(100*12)", "description": "\n\n\n\n\n\n\n\n\n\nThe simple interest earnt. This variable only ever has a maximum of 2 decimal places so does not need rounding or truncating.
", "templateType": "anything", "can_override": false}, "rate": {"name": "rate", "group": "Ungrouped variables", "definition": "random(2.5 .. 5.25#0.25)", "description": "\n\n\n\n\nThe annual interest rate as a percentage.
", "templateType": "randrange", "can_override": false}, "compoundinterest": {"name": "compoundinterest", "group": "Ungrouped variables", "definition": "(amount-principal)", "description": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThe exact value of the compound interest. principal*(1+(rate/4)/100)^(months/3) Used in Advice section.
", "templateType": "anything", "can_override": false}, "names": {"name": "names", "group": "Ungrouped variables", "definition": "['Lola','Marco','Jenny','Liz','Peter','Harry','Ahmad','Abraham']", "description": "The list of potential names.
", "templateType": "anything", "can_override": false}, "name1": {"name": "name1", "group": "Ungrouped variables", "definition": "random(names)", "description": "The selected name.
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["principal", "rate", "months", "simpleinterest", "amount", "compoundinterest", "answer", "names", "name1"], "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": "{name1} earnt \\${trim(dpformat({compoundinterest},2,\"si-en\"))} in compound interest, when \\${formatnumber(principal,'si-en')} was invested at {rate}% per annum compound interest for {months} months, compounded quarterly.
\n\nHow much less interest would {name1} have earnt by investing the same amount for {months} months at the simple interest rate of {rate}% per annum?
\nEnter your answer to the nearest dollar, but do not type in the dollar sign.
", "minValue": "answer", "maxValue": "answer", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Adelle Colbourn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2083/"}], "resources": ["question-resources/Compound_interest_formula.png", "question-resources/Simple_interest_formula.png"]}]}], "contributors": [{"name": "Adelle Colbourn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2083/"}]}