// Numbas version: finer_feedback_settings {"name": "Discounted prices", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "
A randomised table is contained in a div tag with the id #sales-table, so it can be styled using the CSS preamble.
The Greenslate Discounted Price List for 2018 is below
\nAdvice!
", "functions": {"thousandsformat": {"type": "string", "definition": "n = Math.round(n)+'';\nreturn n.replace(/(\\d{1,3}?)(\\d{3})$/,'$1,$2');", "parameters": [["n", "number"]], "language": "javascript"}}, "preamble": {"css": "/* left-align fruit names */\n#sales-table td:first-child, #sales-table:first-child th {\n text-align: left;\n}\n\n/* rows alternate background colour so they're easier to read */\n#sales-table tr:nth-child(even) {\n background: #eee;\n}\n\n/* number columns in monospace font */\n#sales-table td:not(:first-child) {\nfont-family: monospace;\n}\n\n/* style for final totals row */\n#sales-table tr:last-child {\nbackground: #aaa;\nfont-weight: bold;\nborder-top: 2px solid black;\n}\n", "js": ""}, "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Colin Whitehead", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2486/"}], "resources": []}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Colin Whitehead", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2486/"}]}