// Numbas version: finer_feedback_settings {"name": "Significant figures: rounding", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Significant figures: rounding", "tags": [], "metadata": {"description": "

Rounding integers and decimals to a specific number of sig figs.

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

Round the following numbers to the indicated precision.

", "advice": "

When 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

a) To round to two significant figures, we look at the third significant figure to decide whether to round up or down. 

\n

Since the third significant figure of $\\var{integer}$ is $\\var{thirddigit}$, we round $\\var{integer}$ up down to $\\var{siground(integer,2)}$.

\n

Note that $\\var{integer}$ is closer to $\\var{siground(integer,2)}$ than $\\var{wrongint}$. 

\n

b) To round to three significant figures, we look at the fourth significant figure to decide whether to round up or down.

\n

Since the fourth significant figure of $\\var{decimal}$ is $\\var{fourthdigit}$, we round $\\var{decimal}$ up down to $\\var{siground(decimal,3)}$. 

\n

Note that $\\var{decimal}$ is closer to $\\var{siground(decimal,3)}$ than $\\var{wrongdec}$. 

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"integer": {"name": "integer", "group": "Ungrouped variables", "definition": "random(1000..9999)", "description": "", "templateType": "anything", "can_override": false}, "decimal": {"name": "decimal", "group": "Ungrouped variables", "definition": "precround(random(1.11..9.99#0.01)+random(0.0051..0.0091#0.0001),4)", "description": "", "templateType": "anything", "can_override": false}, "thirddigit": {"name": "thirddigit", "group": "Ungrouped variables", "definition": "mod(trunc(integer/10,0),10)", "description": "", "templateType": "anything", "can_override": false}, "fourthdigit": {"name": "fourthdigit", "group": "Ungrouped variables", "definition": "mod(trunc(decimal*1000,0),10)", "description": "", "templateType": "anything", "can_override": false}, "wrongint": {"name": "wrongint", "group": "Ungrouped variables", "definition": "if(thirddigit>=5,trunc(integer,-2),trunc(integer,-2)+100)", "description": "", "templateType": "anything", "can_override": false}, "test": {"name": "test", "group": "Ungrouped variables", "definition": "trunc(4512.3,0)", "description": "", "templateType": "anything", "can_override": false}, "wrongdec": {"name": "wrongdec", "group": "Ungrouped variables", "definition": "if(fourthdigit>=5,trunc(decimal,2),trunc(decimal,2)+0.01)", "description": "", "templateType": "anything", "can_override": false}, "testy": {"name": "testy", "group": "Ungrouped variables", "definition": "mod(decimal*10000,100)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["integer", "decimal", "thirddigit", "fourthdigit", "wrongint", "test", "wrongdec", "testy"], "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": "

The number {integer} rounded to two significant figures is [[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": "{integer}", "maxValue": "{integer}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "sigfig", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "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": "

The number {decimal} rounded to three significant figures is [[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": "{decimal}", "maxValue": "{decimal}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "sigfig", "precision": "3", "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/"}], "resources": []}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}