// Numbas version: exam_results_page_options {"name": "Add weight to a randomly picked number", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Add weight to a randomly picked number", "tags": [], "metadata": {"description": "

Pick from the range -5..5, but make 0 more likely.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": [], "variables": {"weighted_random": {"name": "weighted_random", "group": "Ungrouped variables", "definition": "random(list(-5..5)+repeat(0,5))", "description": "

Turn the range -5..5 into a list, then add some extra zeros on to make 0 more likely.

\n

Try setting the variable testing condition to weighted_random=0 to see how often 0 comes up.

", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["weighted_random"], "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/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}