// Numbas version: exam_results_page_options {"name": "Rounding to the nearest 10, 100, 1000", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Rounding to the nearest 10, 100, 1000", "tags": [], "metadata": {"description": "

A single question which asks you to round to the nearest ten, hundred or thousand. 

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"number": {"name": "number", "group": "Ungrouped variables", "definition": "random(10*seed..50*seed except 10*seed..50*seed#seed)", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "tonearest(number, seed)\n", "description": "", "templateType": "anything", "can_override": false}, "digit_to_the_right": {"name": "digit_to_the_right", "group": "Ungrouped variables", "definition": "mod(floor(10*number/seed),10)\n//(mod(number,seed)-mod(number, seed/10))/(seed/10)\n//floor(lastdigits/(seed/10))", "description": "", "templateType": "anything", "can_override": false}, "seed": {"name": "seed", "group": "Ungrouped variables", "definition": "random(10,100,1000)", "description": "", "templateType": "anything", "can_override": false}, "direction": {"name": "direction", "group": "Ungrouped variables", "definition": "if(digit_to_the_right<5,'down', 'up')", "description": "", "templateType": "anything", "can_override": false}, "seedtext": {"name": "seedtext", "group": "Ungrouped variables", "definition": "switch(seed=10, 'ten', seed=100, 'hundred', seed=1000, 'thousand', 'error')", "description": "", "templateType": "anything", "can_override": false}, "less_greater": {"name": "less_greater", "group": "Ungrouped variables", "definition": "if(digit_to_the_right<5,'less than', 'greater than or equal to')", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["seed", "seedtext", "number", "digit_to_the_right", "direction", "less_greater", "ans"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\var{number}$ rounded to the nearest {seedtext} is [[0]].

\n

\n

", "stepsPenalty": "1", "steps": [{"type": "information", "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": "

When we are rounding we look at the first digit that we might discard. If it is $5$ or greater we round up. If it is less than $5$ we round down.

\n

\n

To round $\\var{number}$ to the nearest {seedtext}, we look to the right of the {seedtext}s column and see the digit $\\var{digit_to_the_right}$. 

\n

Since $\\var{digit_to_the_right}$ is {less_greater} $5$ we round {direction} to $\\var{ans}$. 

"}], "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": "ans", "maxValue": "ans", "correctAnswerFraction": false, "allowFractions": false, "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": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}