// Numbas version: exam_results_page_options {"name": "Rounding to 0, 1, 2 and 3 decimal places", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Rounding to 0, 1, 2 and 3 decimal places", "tags": [], "metadata": {"description": "

Round random numbers to the closest whole number, 1 to 3 decimals places. Also rounding that could show common misunderstandings.

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

If you are unsure of how to do a question, click on Show steps to see the full working. Then, once you understand how to do the question, click on Try another question like this one to start again.

\n

Round the following numbers to the indicated precision.

", "advice": "

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

a) To round to the nearest whole number, we look at the first decimal place to decide whether to round up or down.

\n

b) To round to one decimal place, we look at the second decimal place to decide whether to round up or down.

\n

c) To round to two decimal places, we look at the third decimal place to decide whether to round up or down.

\n

d) To round to three decimal places, we look at the fourth decimal place to decide whether to round up or down.

", "rulesets": {}, "extensions": [], "variables": {"number4": {"name": "number4", "group": "Ungrouped variables", "definition": "n4r+0.00049+random(0.000009,0.000008,0.000007,0.000006,0.000005)", "description": "

this is to see if the student rounds from the end of the number instead of just looking at the fourth decimal place.

", "templateType": "anything"}, "n2d": {"name": "n2d", "group": "Ungrouped variables", "definition": "mod(floor(number2*100),10)", "description": "", "templateType": "anything"}, "n2r": {"name": "n2r", "group": "Ungrouped variables", "definition": "precround(number2,1)", "description": "", "templateType": "anything"}, "n1d": {"name": "n1d", "group": "Ungrouped variables", "definition": "mod(floor(number1*10),10)", "description": "
\n

", "templateType": "anything"}, "n1r": {"name": "n1r", "group": "Ungrouped variables", "definition": "precround(number1,0)", "description": "
\n

", "templateType": "anything"}, "number1": {"name": "number1", "group": "Ungrouped variables", "definition": "random(10.001..300#0.0003)", "description": "", "templateType": "anything"}, "number3": {"name": "number3", "group": "Ungrouped variables", "definition": "random(10..90#0.1)+trick+random(0.00555,0.00666,0.00777,0.00888,0.00999)", "description": "
\n
\n

", "templateType": "anything"}, "n4d": {"name": "n4d", "group": "Ungrouped variables", "definition": "4", "description": "", "templateType": "anything"}, "n4r": {"name": "n4r", "group": "Ungrouped variables", "definition": "random(0.001..0.999#0.001)", "description": "", "templateType": "anything"}, "n3r": {"name": "n3r", "group": "Ungrouped variables", "definition": "precround(number3,2)", "description": "", "templateType": "anything"}, "n3d": {"name": "n3d", "group": "Ungrouped variables", "definition": "mod(floor(number3*1000),10)", "description": "", "templateType": "anything"}, "trick": {"name": "trick", "group": "Ungrouped variables", "definition": "random(0.04,0.05, 0.06, 0.07, 0.08)", "description": "
\n

", "templateType": "anything"}, "number2": {"name": "number2", "group": "Ungrouped variables", "definition": "random(10.001..300#0.0003)", "description": "
\n

", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["number1", "n1d", "n1r", "number2", "n2d", "n2r", "trick", "number3", "n3d", "n3r", "number4", "n4r", "n4d"], "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": "
\n

$\\var{number1}$ to the nearest whole number is [[0]].

", "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": "
\n

We want to round to the nearest whole number. The digit in the first decimal place is $\\var{n1d}$, which is $5$ or more, and so we round up to $\\var{n1r}$. The digit in the first decimal place is $\\var{n1d}$, which is less than $5$ and so we round down to $\\var{n1r}$.

"}], "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": "{number1}", "maxValue": "{number1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "
\nYou have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": 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": "
\n

$\\var{number2}$ rounded to one decimal place is [[0]].

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

We want to round to one decimal place. The digit in the second decimal place is $\\var{n2d}$, which is $5$ or more, and so we round up to $\\var{n2r}$. The digit in the second decimal place is $\\var{n2d}$, which is less than $5$ and so we round down to $\\var{n2r}$.

"}], "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": "{number2}", "maxValue": "{number2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "1", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": 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": "

$\\var{number3}$ rounded to two decimal places is [[0]].

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

We want to round to two decimal places. The digit in the third decimal place is $\\var{n3d}$, which is $5$ or more, and so we round up to $\\var{n3r}$. The digit in the third decimal place is $\\var{n3d}$, which is less than $5$ and so we round down to $\\var{n3r}$.

"}], "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": "{number3}", "maxValue": "{number3}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": 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": "

$\\var{number4}$ rounded to three decimal places is [[0]].

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

We want to round to three decimal places. The digit in the fourth decimal place is $\\var{n4d}$, which is $5$ or more, and so we round up to $\\var{n4r}$. The digit in the fourth decimal place is $\\var{n4d}$, which is less than $5$ and so we round down to $\\var{n4r}$.

"}], "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": "n4r", "maxValue": "n4r", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": 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/"}, {"name": "Adelle Colbourn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2083/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Adelle Colbourn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2083/"}]}