// 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.

\n

i) $\\var{a1}$ rounded to the nearest 10 is:  [[0]]

\n

ii) $\\var{a1}$ rounded to the nearest 100 is:  [[1]]

\n

iii) $\\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.

\n

i) $\\var{b1}$ rounded to the nearest 10 is:  [[0]]

\n

ii) $\\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.

\n

When 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.

\n

To write it down in steps:

\n
    \n
      \n
        \n
          \n
        1. Identify the last digit we need to keep.
        2. \n
        3. Look at the following digit.
        4. \n
        5. If it's 5 or more, increase the previous digit by one.
        6. \n
        7. If it's 4 or less, keep the previous digit the same.
        8. \n
        9. Fill any spaces to the right of the digit with zeros if needed.
        10. \n
        \n
      \n
    \n
\n

It 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.

\n

This 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...).

\n

For example,

\n

\\[295 \\text{ rounded to the nearest ten is } 300 \\text{. Similarly, $295$ rounded to the nearest hundred is also } 300 \\text{.} \\]

\n

We can see the difference between this case occuring and not occuring in parts a) and b).

\n

a)

\n

i)

\n

To approximate to the nearest ten, look at the digit in the tens column.

\n

To 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)}$.

\n

ii)

\n

For the nearest hundred, look at the digit in the hundreds column.

\n

Look 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)}$.

\n

iii)

\n

For the nearest thousand, look at the digit in the thousands column.

\n

Here, 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)}$.

\n

b)

\n

i)

\n

Similarly, 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)}$.

\n

ii)

\n

We look at $\\var{bdig[2]}$. The following digit $9$ is higher than $5$ so we round up to get $\\var{siground(b1, 3)}$.

\n

We 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/"}]}