// Numbas version: exam_results_page_options {"name": "Compute modulus of a number 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Compute modulus of a number 2", "tags": [], "metadata": {"description": "

Compute the modulus of either (a) a signed decimal, or (b) a sum or difference of two decimals.

\n

Used in HELM Book 1.1.5 Exercises

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Compute the following:

", "advice": "

{advice}

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"v1": {"name": "v1", "group": "Ungrouped variables", "definition": "decimal(random(-1000..1000 except 0)/1000)", "description": "", "templateType": "anything", "can_override": false}, "v2": {"name": "v2", "group": "Ungrouped variables", "definition": "decimal(random(-1000..1000 except v1*1000)/1000)", "description": "", "templateType": "anything", "can_override": false}, "val": {"name": "val", "group": "Ungrouped variables", "definition": "[abs(v1),\n abs(v1-v2)][idx]", "description": "", "templateType": "anything", "can_override": false}, "idx": {"name": "idx", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything", "can_override": true}, "dexpr": {"name": "dexpr", "group": "Ungrouped variables", "definition": "([\"|\"+v1+\"|\",\"|\"+v1+\"-(\"+v2+\")|\"][idx])", "description": "", "templateType": "anything", "can_override": false}, "advice": {"name": "advice", "group": "Ungrouped variables", "definition": "[\"Take the magnitude of the value inside the absolute value signs\",\n \"Do the calculation inside the absolute value signs first. Then take the absolute value of the answer.\"\n ][idx]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["v1", "v2", "val", "idx", "dexpr", "advice"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

(a) $\\var{dexpr}$ = [[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "val", "maxValue": "val", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}