// Numbas version: finer_feedback_settings {"name": "Ben's copy of Show amounts of currency with trailing zeros", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "

Use the currency function to format amounts of money.

\n

Plain text: {currency(a,\"£\",\"p\")}

\n

In TeX: $\\var{currency(a/100,\"£\",\"p\")} + \\var{currency(b*1000,\"£\",\"p\")} = \\var{currency(0.7,\"£\",\"p\")}$

\n

\n

For convenience, you can define a custom function which uses your preferred prefix and suffix.

\n

Plain text: {pounds(a)}

\n

In TeX: $\\var{pounds(a)} + \\var{pounds(b)} = \\var{pounds(a+b)}$

", "metadata": {"description": "

This question is out of date: use the currency function instead.

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [], "tags": [], "variable_groups": [], "extensions": [], "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "name": "Ben's copy of Show amounts of currency with trailing zeros", "ungrouped_variables": ["a", "b"], "variables": {"b": {"definition": "random(1..20#0.1)", "group": "Ungrouped variables", "name": "b", "templateType": "anything", "description": ""}, "a": {"definition": "random(1..20#0.1)", "group": "Ungrouped variables", "name": "a", "templateType": "anything", "description": ""}}, "advice": "", "preamble": {"css": "", "js": ""}, "functions": {"pounds": {"definition": "currency(n,\"\u00a3\",\"p\")", "parameters": [["n", "number"]], "type": "string", "language": "jme"}}, "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}