// Numbas version: exam_results_page_options {"name": "Rounding numbers to the nearest powers of ten", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Rounding numbers to the nearest powers of ten", "type": "question", "statement": "
We can approximate numbers by rounding.
", "variablesTest": {"condition": "", "maxRuns": "100"}, "variables": {"b1": {"description": "Random integer with 9 in the tens column.
", "name": "b1", "group": "Ungrouped variables", "templateType": "anything", "definition": "n_from_digits(bdig) - bdig[1]*10 + 90 - bdig[0] + random(6..9)"}, "adig": {"description": "", "name": "adig", "group": "Ungrouped variables", "templateType": "anything", "definition": "repeat(random(1..8), 5)"}, "a1": {"description": "Random integer ending with 5.
", "name": "a1", "group": "Ungrouped variables", "templateType": "anything", "definition": "n_from_digits(adig) - adig[0] + 5"}, "bdig": {"description": "", "name": "bdig", "group": "Ungrouped variables", "templateType": "anything", "definition": "repeat(random(1..9), 5)"}}, "extensions": [], "functions": {"n_from_digits": {"parameters": [["digits", "list"]], "type": "number", "language": "jme", "definition": "if(\n len(digits)=0,\n 0,\n digits[0]+10*n_from_digits(digits[1..len(digits)])\n)"}}, "tags": ["rounding", "taxonomy"], "variable_groups": [], "parts": [{"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "{siground(a1, 4)}", "showFeedbackIcon": true, "minValue": "{siground(a1, 4)}", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "{siground(a1, 3)}", "showFeedbackIcon": true, "minValue": "{siground(a1, 3)}", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "{siground(a1, 2)}", "showFeedbackIcon": true, "minValue": "{siground(a1, 2)}", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "Round $\\var{a1}$ to the nearest 10, 100 and 1000.
\ni) $\\var{a1}$ rounded to the nearest 10 is: [[0]]
\nii) $\\var{a1}$ rounded to the nearest 100 is: [[1]]
\niii) $\\var{a1}$ rounded to the nearest 1000 is: [[2]]
", "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "{siground(b1, 4)}", "showFeedbackIcon": true, "minValue": "{siground(b1, 4)}", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "{siground(b1, 3)", "showFeedbackIcon": true, "minValue": "{siground(b1, 3)}", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "Round $\\var{b1}$ to the nearest 10 and 100.
\ni) $\\var{b1}$ rounded to the nearest 10 is: [[0]]
\nii) $\\var{b1}$ rounded to the nearest 100 is: [[1]]
", "marks": 0}], "ungrouped_variables": ["adig", "bdig", "a1", "b1"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Round some large integers to the a given power of ten.
"}, "preamble": {"css": "", "js": ""}, "advice": "The first thing to do when we are rounding numbers is to identify the last digit we are keeping.
\nWhen you're asked to round your answer to the nearest powers of ten, you need to decide whether to keep the last digit same (rounding down) or increase it by 1 (rounding up). If the following digit is less than 5 we round down and we round up when the next digit is 5 or more.
\nTo write it down in steps:
\nIt is important to keep in mind that if the digit we are increasing is 9, it becomes zero and we increase the previous digit instead. If this digit is 9 as well, we move along to the left side until we find a digit less than 9.
\nThis is why sometimes, the number rounded to the nearest ten is also already rounded to the nearest hundred (possibly to the nearest thousand, ten thousand...).
\nFor example,
\n\\[295 \\text{ rounded to the nearest ten is } 300 \\text{. Similarly, $295$ rounded to the nearest hundred is also } 300 \\text{.} \\]
\nWe can see the difference between this case occuring and not occuring in parts a) and b).
\ni)
\nTo approximate to the nearest ten, look at the digit in the tens column.
\nTo round $\\var{a1}$, we look at the digit $\\var{adig[1]}$ in the tens column. The following digit is $5$, so we round up, increasing $\\var{adig[1]}$ by one, becoming $\\var{adig[1] +1}$. We replace the remaining digit with $0$. The rounded number is $\\var{siground(a1, 4)}$.
\nii)
\nFor the nearest hundred, look at the digit in the hundreds column.
\nLook at digit $\\var{adig[2]}$ in the hundreds column. The following digit is $\\var{adig[1]}$, so we round updown to get $\\var{siground(a1, 3)}$.
\niii)
\nFor the nearest thousand, look at the digit in the thousands column.
\nHere, the digit is $\\var{adig[3]}$ in the thousands column. The following digit is $\\var{adig[2]}$, so we round updown to get $\\var{siground(a1, 2)}$.
\ni)
\nSimilarly, to round $\\var{b1}$, we look at the digit $9$ in the tens column. The following digit is more than 5, so we round up. The digit $9$ becomes $0$ and we increase the previous digit $\\var{bdig[2]}$ instead. The rounded number is $\\var{siground(b1, 4)}$.
\nii)
\nWe look at $\\var{bdig[2]}$. The following digit $9$ is higher than $5$ so we round up to get $\\var{siground(b1, 3)}$.
\nWe can see that the answer for parts i) and ii) is the same, because the digit in the tens column was 9. This is the occurence that we talked about earlier, where the nearest ten equals the nearest hundred.
\n\n\n", "contributors": [{"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}]}]}], "contributors": [{"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}]}