// Numbas version: exam_results_page_options {"name": "Merryn's copy of Decimals: rounding", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Merryn's copy of Decimals: rounding", "tags": ["decimals", "Decimals", "rounding"], "metadata": {"description": "

I think I prefer the other question I made called \"Rounding to 0, 1, 2 and 3 decimal places\"

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"wholelist": {"name": "wholelist", "group": "Ungrouped variables", "definition": "shuffle([whole1, whole2, whole3])", "description": "", "templateType": "anything", "can_override": false}, "whole1": {"name": "whole1", "group": "Ungrouped variables", "definition": "random(2..187)+random(list(0.0..0.4#0.1))+random(list(0.05..0.09#0.01))", "description": "", "templateType": "anything", "can_override": false}, "whole3": {"name": "whole3", "group": "Ungrouped variables", "definition": "random(2..187)+0.5", "description": "", "templateType": "anything", "can_override": false}, "twolist": {"name": "twolist", "group": "Ungrouped variables", "definition": "shuffle([two1,two2,two3])", "description": "", "templateType": "anything", "can_override": false}, "two3": {"name": "two3", "group": "Ungrouped variables", "definition": "random(2..187)+random(list(0.0..0.9#0.1))+random(list(0.00..0.04#0.01))+0.005+random(list(0.00001..0.00009#0.00001))", "description": "", "templateType": "anything", "can_override": false}, "whole2": {"name": "whole2", "group": "Ungrouped variables", "definition": "random(2..187)+random(list(0.5..0.9#0.1))+random(list(0.01..0.04#0.01))", "description": "", "templateType": "anything", "can_override": false}, "two2": {"name": "two2", "group": "Ungrouped variables", "definition": "random(2..187)+random(list(0.0..0.9#0.1))+random(list(0.05..0.09#0.01))+random(list(0.001..0.004#0.001))+random(list(0.0001..0.0009#0.0001))", "description": "", "templateType": "anything", "can_override": false}, "two1": {"name": "two1", "group": "Ungrouped variables", "definition": "random(2..187)+random(list(0.0..0.9#0.1))+random(list(0.00..0.04#0.01))+random(list(0.005..0.009#0.001))+random(list(0.0001..0.0009#0.0001))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["whole1", "whole2", "whole3", "wholelist", "two1", "two2", "two3", "twolist"], "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": "

Round the following decimals to the nearest whole number ($0$ decimal places):

\n

$\\var{wholelist[0]}=$ [[0]]

\n

$\\var{wholelist[1]}=$ [[1]]

\n

$\\var{wholelist[2]}=$ [[2]]

", "stepsPenalty": 0, "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": "

If it is 5 or more, round up, otherwise round down.

\n

\n
\n

\n

To round to a whole number you look at the first decimal place to determine whether you round up or down. If the first decimal place is a 5 or more then you round up (increase the units column by 1) and discard the decimals. If the first decimal 4 or less then you round down (leave the units column as it is) and discard the decimals.

\n

\n
\n

\n

For example:

\n\n

\n
\n

\n

Note we only look at the first decimal place when rounding to whole numbers, the others are irrelevant, that is 123.4998 should still be rounded to 123.  

"}], "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": "precround(wholelist[0],0)", "maxValue": "precround(wholelist[0],0)", "correctAnswerFraction": false, "allowFractions": false, "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": "precround(wholelist[1],0)", "maxValue": "precround(wholelist[1],0)", "correctAnswerFraction": false, "allowFractions": false, "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": "precround(wholelist[2],0)", "maxValue": "precround(wholelist[2],0)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "

Round the following decimals to $2$ decimal places:

\n

$\\var{twolist[0]}=$ [[0]]

\n

$\\var{twolist[1]}=$ [[1]]

\n

$\\var{twolist[2]}=$ [[2]]

\n

Note: Suppose your answer was $123.4$, you need to enter your answer as $123.40$ since the question asks for $2$ decimal places.

", "stepsPenalty": 0, "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": "

If it is 5 or more, round up, otherwise round down.

\n

\n
\n

\n

Since we are told to round to two decimal places we look at the third decimal place to determine if we round up or down. If the third decimal place is a 5 or more then you round up (increase the second decimal place by 1) and discard the digits to the right. If the third decimal place is 4 or less then you round down (leave the second decimal place as it is) and discard the digits to the right.

\n

\n
\n

\n

For example:

\n"}], "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": "precround(twolist[0],2)", "maxValue": "precround(twolist[0],2)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": false, "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": "precround(twolist[1],2)", "maxValue": "precround(twolist[1],2)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": false, "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": "precround(twolist[2],2)", "maxValue": "precround(twolist[2],2)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": false, "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/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}