// Numbas version: finer_feedback_settings {"name": "Format a time with lpad", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Format a time with lpad", "tags": [], "metadata": {"description": "
Shows how to use the lpad function to format a time in HH:MM format so that leading zeros are used for numbers less than 10.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Here's a randomly chosen time: {formatted_time}.
", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"minutes": {"name": "minutes", "group": "Ungrouped variables", "definition": "random(0..59)", "description": "", "templateType": "anything", "can_override": false}, "hours": {"name": "hours", "group": "Ungrouped variables", "definition": "random(0..23)", "description": "", "templateType": "anything", "can_override": false}, "formatted_time": {"name": "formatted_time", "group": "Ungrouped variables", "definition": "lpad(string(hours),2,\"0\")+\":\"+lpad(string(minutes),2,\"0\")", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["hours", "minutes", "formatted_time"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "resources": []}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}