// Numbas version: exam_results_page_options {"name": "sean'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": [{"name": "sean's copy of Show amounts of currency with trailing zeros", "metadata": {"description": "

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

", "licence": "Creative Commons Attribution 4.0 International"}, "variables": {"a": {"templateType": "anything", "definition": "random(1..20#0.1)", "name": "a", "group": "Ungrouped variables", "description": ""}, "b": {"templateType": "anything", "definition": "random(1..20#0.1)", "name": "b", "group": "Ungrouped variables", "description": ""}}, "functions": {"pounds": {"parameters": [["n", "number"]], "language": "jme", "definition": "currency(n,\"\u00a3\",\"p\")", "type": "string"}}, "rulesets": {}, "preamble": {"css": "", "js": ""}, "extensions": [], "ungrouped_variables": ["a", "b"], "advice": "", "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [], "statement": "

Use the currency function to format amounts of money.

\n

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

\n

In TeX: $\\var{currency(a,\"\\$\",\"p\")} + \\var{currency(b,\"£\",\"p\")} = \\var{currency(a+b,\"£\",\"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)}$

", "tags": [], "variable_groups": [], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "sean hunte", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3167/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "sean hunte", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3167/"}]}