// Numbas version: exam_results_page_options {"name": "Compute modulus of a number", "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", "tags": [], "metadata": {"description": "

Compute the modulus of (a) a positive rational, (b) a negative rational, (c) 0

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

Compute the following:

", "advice": "

The modulus is simply the distance of the number from 0. It is always 0 or a positive quantity.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"i1": {"name": "i1", "group": "Ungrouped variables", "definition": "random(1..100)", "description": "", "templateType": "anything", "can_override": false}, "n1raw": {"name": "n1raw", "group": "Ungrouped variables", "definition": "random(1..50)", "description": "", "templateType": "anything", "can_override": false}, "d1raw": {"name": "d1raw", "group": "Ungrouped variables", "definition": "random(n1raw+1,51)", "description": "", "templateType": "anything", "can_override": false}, "n1": {"name": "n1", "group": "Ungrouped variables", "definition": "n1raw/gcd(n1raw,d1raw)", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "d1raw/gcd(n1raw,d1raw)", "description": "", "templateType": "anything", "can_override": false}, "v1": {"name": "v1", "group": "Ungrouped variables", "definition": "rational(random(i1,n1/d1))", "description": "", "templateType": "anything", "can_override": false}, "i2": {"name": "i2", "group": "Ungrouped variables", "definition": "random(-100..-1)", "description": "", "templateType": "anything", "can_override": false}, "n2raw": {"name": "n2raw", "group": "Ungrouped variables", "definition": "random(-50..-1)", "description": "", "templateType": "anything", "can_override": false}, "d2raw": {"name": "d2raw", "group": "Ungrouped variables", "definition": "random(-1*n2raw+1..51)", "description": "", "templateType": "anything", "can_override": false}, "n2": {"name": "n2", "group": "Ungrouped variables", "definition": "n2raw/gcd(n2raw,d2raw)", "description": "", "templateType": "anything", "can_override": false}, "d2": {"name": "d2", "group": "Ungrouped variables", "definition": "d2raw/gcd(n2raw,d2raw)", "description": "", "templateType": "anything", "can_override": false}, "v2": {"name": "v2", "group": "Ungrouped variables", "definition": "rational(random(i2,n2/d2))", "description": "", "templateType": "anything", "can_override": false}, "v3": {"name": "v3", "group": "Ungrouped variables", "definition": "0", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["i1", "n1raw", "d1raw", "n1", "d1", "v1", "i2", "n2raw", "d2raw", "n2", "d2", "v2", "v3"], "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) $\\left|\\var[fractionNumbers]{v1}\\right|$ = [[0]]

\n

(b) $\\left|\\var[fractionNumbers]{v2}\\right|$ = [[1]]

\n

(c) $\\left|\\var[fractionNumbers]{v3}\\right|$ = [[2]]

", "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": "abs(v1)", "maxValue": "abs(v1)", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "abs(v2)", "maxValue": "abs(v2)", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "abs(v3)", "maxValue": "abs(v3)", "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/"}]}