// Numbas version: exam_results_page_options {"name": "Pay during discount period or not", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"showCellAnswerState": true, "distractors": ["", ""], "customMarkingAlgorithm": "", "customName": "", "showFeedbackIcon": true, "marks": 0, "unitTests": [], "displayColumns": "1", "displayType": "radiogroup", "useCustomName": false, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": ["yesborrow", "no"], "variableReplacements": [], "scripts": {}, "extendBaseMarkingAlgorithm": true, "prompt": "

Suppose the opportunity cost of not paying an invoice within a discount period is \$\\var{OC}\\%\$ p.a. You don't have the funds to pay within the discount period, however, you can borrow at a rate of \$\\var{B}\\%\$ p.a.

\n

Should you borrow money to pay the invoice within the discount period?

", "minMarks": 0, "variableReplacementStrategy": "originalfirst", "choices": ["Yes. Borrow and get the discount.", "No. Don't borrow and just pay after the discount period."], "shuffleChoices": false}], "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "Financial maths. To be used with the question on opportunity cost."}, "variables": {"yesborrow": {"name": "yesborrow", "templateType": "anything", "definition": "if(B1 means borrow and get the discount, 0 means don't

"}, "B": {"name": "B", "templateType": "anything", "definition": "random(5..25#0.01 except (OC-1)..(OC+1)#0.001)", "group": "Ungrouped variables", "description": ""}, "no": {"name": "no", "templateType": "anything", "definition": "if(B>OC,1,0)", "group": "Ungrouped variables", "description": ""}, "OC": {"name": "OC", "templateType": "anything", "definition": "random(5..25#0.01)", "group": "Ungrouped variables", "description": ""}}, "advice": "

The opportunity cost of forgoing a discount is \$\\var{OC}\\%\$ p.a., this is equivalent to borrowing at \$\\var{OC}\\%\$ p.a. However, you can actually borrow at \$\\var{B}\\%\$ p.a. Since you want to minimise the interest rate you are borrowing at it makes sense to borrow money to pay within the discount period. avoid borrowing and just miss the discount.

\n

", "variable_groups": [], "extensions": [], "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.

", "rulesets": {}, "tags": [], "ungrouped_variables": ["OC", "B", "yesborrow", "no"], "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}, "name": "Pay during discount period or not", "preamble": {"js": "", "css": ""}, "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/"}]}