// Numbas version: exam_results_page_options {"name": "Rounding and estimating", "metadata": {"description": "

Several questions on rounding number and using approximations to estimate. Several real-world examples.

", "licence": "Creative Commons Attribution 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], [], []], "questions": [{"name": "Rounding numbers to the nearest powers of ten", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "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)"}}, "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

"}, {"name": "Find bounds for distance and time spent running, given imprecise measurements", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "metadata": {"description": "

Multiplication and division of upper and lower bounds.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["speed", "distance", "time", "atime", "person", "pronouns", "verbs"], "statement": "

{person['name']} is a keen runner. {capitalise(pronouns['they'])} run{verbs} at an average speed of {speed}km/h, rounded to the nearest integer.

", "variable_groups": [], "rulesets": {}, "type": "question", "advice": "

We're not certain about some of the measurements given in this question - we only know the rounded values. This means that the true value could be lower or higher than the given measurement.

\n

We can find upper and lower bounds for the given measurements. Any values we go on to calculate will also be uncertain and have upper and lower bounds.

\n

\n

To find bounds for a given measurement, we divide the degree of accuracy by 2 and subtract or add this to our estimate to get lower and upper bounds respectively.

\n

For example, $52$ rounded to the nearest integer has a lower bound of $51.5$ and an upper bound of $52.5$.

\n

a)

\n

The distance travelled is given by

\n

\\[ d = \\text{Average speed} \\times \\text{Time taken} \\]

\n

We find bounds for speed and time first.

\n

Lower bound for speed: $\\var{speed} - 0.5 = \\var{speed - 0.5} \\text{ km/h}$

\n

Upper bound for speed: $\\var{speed} + 0.5 = \\var{speed + 0.5} \\text{ km/h}$

\n

First, note that the speed is given in km/h and we want to find the distance in km. We will convert the given time into hours. 

\n

Lower bound for time taken:

\n

\\begin{align} \\var{atime} - 0.5 &= \\var{atime - 0.5} \\text{ min} \\\\[0.5em]
&= \\frac{\\var{atime - 0.5}}{60} \\text{ h}
\\end{align}

\n

Upper bound for time taken:

\n

\\begin{align} \\var{atime} + 0.5 &= \\var{atime + 0.5} \\text{ min} \\\\[0.5em]
&= \\frac{\\var{atime + 0.5}}{60} \\text{ h}
\\end{align}

\n

Since we're multiplying the speed and time together, the lower bound for distance is the slowest speed multiplied by the shortest time:

\n

\\begin{align}
\\text{Lower bound} &= \\text{lower bound for speed} \\times \\text{lower bound for time}\\\\
&= \\var{speed - 0.5} \\times \\frac{\\var{(atime - 0.5)}}{60} \\\\
&= \\var{precround((speed-0.5)*(atime - 0.5)/60, 2 )} \\text{ km} \\quad \\text{(rounded to 2 decimal places).}
\\end{align}

\n

The upper bound for distance is the fastest speed multiplied by the longest time:

\n

\\begin{align}
\\text{Upper bound} &= \\text{upper bound for speed} \\times \\text{upper bound for time} \\\\
&= \\var{speed + 0.5} \\times \\frac{\\var{atime + 0.5}}{60} \\\\
&= \\var{precround((speed+0.5)*(atime + 0.5)/60, 2 )} \\text{ km} \\quad \\text{(rounded to 2 decimal places).}
\\end{align}

\n

Hence,

\n

\\[\\var{precround((speed-0.5)*(atime - 0.5)/60, 2 )} \\leq d \\lt \\var{precround((speed+0.5)*(atime + 0.5)/60, 2 )} \\text{.}\\]

\n

\n

b)

\n

We're told the speed and the distance travelled, so the time taken is given by

\n

\\[ t = \\frac{\\text{Distance travelled}}{\\text{Average speed}} \\]

\n

We found upper and lower bounds for {person['name']}'s average speed above.

\n

The distance of the evening run is given to the nearest kilometre, so we can compute bounds as follows:

\n

Lower bound for distance: $\\var{distance} - 0.5 = \\var{distance - 0.5} \\mathrm{km}$

\n

Upper bound for distance: $\\var{distance} + 0.5 = \\var{distance + 0.5} \\mathrm{km}$

\n

\n

The upper bound for the time taken is the longest distance divided by the slowest speed:

\n

\\begin{align}
\\text{Upper bound} &= \\text{upper bound for distance} \\div \\text{lower bound for speed} \\\\
&= \\var{distance + 0.5} \\div \\var{speed - 0.5} \\\\
&= \\var{(distance + 0.5)/(speed - 0.5)} \\text{ hours.}
\\end{align}

\n

We're asked for the answer in minutes, to two decimal places.

\n

\\begin{align} 
\\var{(distance + 0.5)/(speed - 0.5)} \\text{ hours} &= \\var{(distance + 0.5)/(speed - 0.5)}\\times 60  \\text{ min} \\\\
&= \\var{precround((distance + 0.5)/(speed - 0.5)*60, 2)} \\text{ minutes} \\quad \\text{(rounded to 2 decimal places)}
\\end{align}

\n

\n

The lower bound for time is the shortest distance divided by the fastest speed:

\n

\\begin{align}
\\text{Lower bound} &= \\text{lower bound for distance} \\div \\text{upper bound for speed} \\\\
&= \\var{distance - 0.5} \\div \\var{speed + 0.5} \\\\
&= \\var{(distance - 0.5)/(speed + 0.5)}  \\text{ hours.}
\\end{align}

\n

Converting into minutes, to two decimal places:

\n

\\begin{align} 
\\var{(distance - 0.5)/(speed + 0.5)} \\text{ hours} &= \\var{(distance - 0.5)/(speed + 0.5)}\\times 60  \\text{ min} \\\\
&= \\var{precround((distance - 0.5)/(speed + 0.5)*60, 2)} \\text{ min.}
\\end{align}

\n

Therefore, we cannot confidently say {person['name']}'s time was less than {time*60 +1} minutes as the upper bound for {pronouns['their']} time, $\\var{precround((distance + 0.5)/(speed - 0.5)*60, 2)}$ minutes, is above this threshold.

", "parts": [{"scripts": {}, "steps": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "information", "showCorrectAnswer": true, "prompt": "

We're not certain about some of the measurements given in this question - we only know the rounded values. This means that the true value could be lower or higher than the given measurement.

\n

Compute upper and lower bounds for {person['name']}'s average speed and the time spent running, then use those to find upper and lower bounds for the distance travelled.

", "variableReplacements": [], "showFeedbackIcon": true, "marks": 0}], "type": "gapfill", "variableReplacements": [], "marks": 0, "showCorrectAnswer": true, "prompt": "

Suppose {person['name']} ran for {atime} minutes, rounded to the nearest minute.

\n

Using the rounded figures for {pronouns['their']} average speed and time spent running, calculate upper and lower bounds for the distance, $d$, that {person['name']} ran.

\n

Round your answers to two decimal places.

\n

[[0]] $\\leq d \\lt$ [[1]]km

", "gaps": [{"correctAnswerFraction": false, "variableReplacements": [], "precisionPartialCredit": 0, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "precision": "2", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "{speed - 0.5}*{(atime - 0.5)/60}", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "{speed - 0.5}*{(atime - 0.5)/60}", "mustBeReduced": false, "allowFractions": false, "strictPrecision": false, "correctAnswerStyle": "plain", "precisionMessage": "You have not given your answer to the correct precision.", "showPrecisionHint": false, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "variableReplacements": [], "precisionPartialCredit": 0, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "precision": "2", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "{speed + 0.5}*{(atime + 0.5)/60}", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "{speed + 0.5}*{(atime + 0.5)/60}", "mustBeReduced": false, "allowFractions": false, "strictPrecision": false, "correctAnswerStyle": "plain", "precisionMessage": "You have not given your answer to the correct precision.", "showPrecisionHint": false, "showCorrectAnswer": true}], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "stepsPenalty": 0}, {"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

Now consider {person['name']}'s evening run. {capitalise(pronouns['they'])} covered a distance of {precround(distance,0)}km, rounded to the nearest kilometre.

\n

{capitalise(pronouns['their'])} friend's record time for the evening run is exactly {time*60 +1} minutes.

\n

Can we confidently say that {person['name']} beat {pronouns['their']} friend's record?

\n

First, calculate the lower and upper bounds for {person['name']}'s time, $t$.

\n

Round your answers to two decimal places.

\n

[[0]] $\\leq t \\lt $ [[1]] minutes

", "gaps": [{"correctAnswerFraction": false, "variableReplacements": [], "precisionPartialCredit": 0, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "precision": "2", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "({precround(distance,0) - 0.5}/{speed + 0.5})*60", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "({precround(distance,0) - 0.5}/{speed + 0.5})*60", "mustBeReduced": false, "allowFractions": false, "strictPrecision": false, "correctAnswerStyle": "plain", "precisionMessage": "You have not given your answer to the correct precision.", "showPrecisionHint": false, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "variableReplacements": [], "precisionPartialCredit": 0, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "precision": "2", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "({precround(distance,0) + 0.5}/{speed - 0.5})*60", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "({precround(distance,0) + 0.5}/{speed - 0.5})*60", "mustBeReduced": false, "allowFractions": false, "strictPrecision": false, "correctAnswerStyle": "plain", "precisionMessage": "You have not given your answer to the correct precision.", "showPrecisionHint": false, "showCorrectAnswer": true}], "showFeedbackIcon": true, "marks": 0}, {"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

Therefore, we [[0]] confidently say {pronouns['their']} time was less than {time*60+1} minutes as the [[1]] bound for time is [[2]] the given threshold of {time*60+1} mins.

", "gaps": [{"shuffleChoices": false, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["

can

", "

cannot

"], "distractors": ["", ""], "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": [0, "1"], "displayType": "dropdownlist"}, {"shuffleChoices": true, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["

upper

", "

lower

"], "distractors": ["", ""], "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": ["1", 0], "displayType": "dropdownlist"}, {"shuffleChoices": true, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["

above

", "

below

", "

equal to

"], "distractors": ["", "", ""], "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": ["1", 0, 0], "displayType": "dropdownlist"}], "showFeedbackIcon": true, "marks": 0}], "tags": ["division", "limits of accuracy", "lower bounds", "multiplication", "random names", "taxonomy", "upper bounds"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"pronouns": {"description": "", "definition": "person['pronouns']", "group": "Ungrouped variables", "name": "pronouns", "templateType": "anything"}, "distance": {"description": "

Distance in kms.

", "definition": "speed*time", "group": "Ungrouped variables", "name": "distance", "templateType": "anything"}, "atime": {"description": "

Time in minutes

", "definition": "random(5..30 #5)", "group": "Ungrouped variables", "name": "atime", "templateType": "anything"}, "verbs": {"description": "", "definition": "if(person['gender']='neutral','','s')", "group": "Ungrouped variables", "name": "verbs", "templateType": "anything"}, "person": {"description": "", "definition": "random_person()", "group": "Ungrouped variables", "name": "person", "templateType": "anything"}, "time": {"description": "

Time in hours.

", "definition": "random(0.25..1 #0.25)", "group": "Ungrouped variables", "name": "time", "templateType": "anything"}, "speed": {"description": "

Speed in km/h.

", "definition": "random(7..11)", "group": "Ungrouped variables", "name": "speed", "templateType": "anything"}}, "variablesTest": {"maxRuns": "1000", "condition": ""}}, {"name": "Rounding and estimating calculations - adding up prices in a shop", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "type": "question", "tags": ["random names", "taxonomy"], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"cash": {"templateType": "anything", "name": "cash", "description": "

Amount of cash we have.

", "definition": "if(can_afford,\n ceil(total_rounded_up)\n ,\n ceil(sum(p)+ice_cream)-1\n)\n ", "group": "Randoms"}, "can_afford": {"templateType": "anything", "name": "can_afford", "description": "

Can we afford all three items?

", "definition": "random(true,false)", "group": "Randoms"}, "total_rounded_up": {"templateType": "anything", "name": "total_rounded_up", "description": "

Total price of the three items when rounding up.

", "definition": "precround(p[0]+0.05,1) + precround(p[1]+0.05,1) + precround(ice_cream,1)", "group": "Randoms"}, "flavour": {"templateType": "anything", "name": "flavour", "description": "

Flavour of the ice cream.

", "definition": "random(\"strawberry cheesecake\", \"cookie dough\", \"mint chocolate chip\", \"vanilla\", \"raspberry\", \"Neapolitan\")", "group": "Randoms"}, "ice_cream": {"templateType": "anything", "name": "ice_cream", "description": "

Price of the ice cream

", "definition": "(random(100..380#10)+9)/100", "group": "Randoms"}, "p": {"templateType": "anything", "name": "p", "description": "

Prices of the first two items.

", "definition": "repeat((random(30..200 #10) + random(1..9))/100,2)", "group": "Randoms"}}, "functions": {"pounds": {"parameters": [["n", "number"]], "type": "string", "language": "jme", "definition": "if(n>=1,currency(n,\"\u00a3\",\"\"), \"\u00a3\"+dpformat(n,2))"}}, "statement": "

Imagine you are shopping at the supermarket. You only have £{cash} in cash. There are two items in your basket so far, costing {currency(p[0],\"£\",\"p\")} and {currency(p[1],\"£\",\"p\")}.

\n

Just before checkout, you notice a tasty {flavour} ice cream on the shelf. It costs {currency(ice_cream,\"£\",\"p\")}. Can you put this in your basket without going over your limit?

", "variable_groups": [{"name": "Randoms", "variables": ["p", "ice_cream", "total_rounded_up", "can_afford", "cash", "flavour"]}, {"name": "Answers", "variables": []}], "parts": [{"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"displayColumns": 0, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "choices": ["

Round up.

", "

Round down.

"], "showFeedbackIcon": true, "shuffleChoices": false, "matrix": ["1", "0"], "variableReplacements": [], "marks": 0, "scripts": {}, "showCorrectAnswer": true, "maxMarks": 0, "type": "1_n_2"}], "showCorrectAnswer": true, "prompt": "

If we don't want to underestimate the total price of these items, do we round the individual prices up, or down?

\n

[[0]]

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"correctAnswerFraction": false, "precisionMessage": "You have not given your answer to the correct precision.", "precisionPartialCredit": 0, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "precision": "2", "precisionType": "dp", "maxValue": "total_rounded_up", "showFeedbackIcon": true, "minValue": "total_rounded_up", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "showPrecisionHint": false, "marks": 1, "variableReplacements": [], "strictPrecision": false, "showCorrectAnswer": true}], "showCorrectAnswer": true, "prompt": "

Estimate the total price if we buy the ice cream, rounding the price of each item to 1 decimal place.

\n

£ [[0]]

\n

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"displayColumns": 0, "minMarks": 0, "type": "1_n_2", "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "choices": ["

Yes, we do have enough cash.

", "

No, we may not have enough.

"], "showFeedbackIcon": true, "shuffleChoices": false, "matrix": "if(can_afford,[1,0],[0,1])", "variableReplacements": [], "marks": 0, "scripts": {}, "showCorrectAnswer": true, "maxMarks": 0}], "showCorrectAnswer": true, "prompt": "

Can we be sure that we have enough cash to pay for all three items?

\n

[[0]]

", "type": "gapfill"}], "ungrouped_variables": [], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Estimate whether you can afford an extra item in a shop by rounding prices to the nearest 10p.

"}, "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

We want to ensure we won't go over the limit, so it is better to overestimate. If we underestimated, we could potentially think we have enough money when we don't.

\n

To overestimate our total, we round each price up.

\n

b)

\n

We round up all our values to 1 decimal place:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Original prices£{p[0]}£{p[1]}£{ice_cream}
Rounded up{pounds(precround(p[0]+0.05,1))}{pounds(precround(p[1]+0.05,1))}{pounds(precround(ice_cream,1))}
\n

Now we calculate the total of these rounded numbers:

\n

\\[ \\var{pounds(precround(p[0]+0.05,1))} + \\var{pounds(precround(p[1]+0.05,1))} + \\var{pounds(precround(ice_cream,1))} = \\var{pounds(total_rounded_up)} \\]

\n

c)

\n

As the estimated total, £{dpformat(total_rounded_up,2)}, is {if(can_afford,'lower','higher')} than £{cash}, we {if(can_afford,'do have','may not have')} enough money to purchase the {flavour} ice cream.

"}, {"name": "Rounding and estimating calculations - painting a room", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "type": "question", "statement": "

{person['name']} just bought a new house. {capitalise(pronouns['their'])} new bedroom's wall and ceiling are currently painted white, but {pronouns['they']} would like to paint these {colour}.

\n

The dimensions of the floor are $\\var{length}\\,\\mathrm{m} \\times \\var{width}\\,\\mathrm{m}$ and the room is $\\var{height}\\,\\mathrm{m}$ high. 

\n

{person['name']} want{verbs} to know how much paint to buy so {pronouns['they']} can paint all four walls and the ceiling {colour}.

", "variablesTest": {"condition": "mod(rall,15)<>0", "maxRuns": 100}, "variables": {"buckets": {"description": "", "name": "buckets", "group": "Calculations", "templateType": "anything", "definition": "ceil(rall/bucket_area)"}, "bucket_area": {"description": "

The area that can be painted with one bucket of paint.

", "name": "bucket_area", "group": "Calculations", "templateType": "anything", "definition": "15"}, "colour": {"description": "", "name": "colour", "group": "Random bits", "templateType": "anything", "definition": "random(\"green\", \"red\", \"orange\", \"yellow\", \"blue\", \"purple\", \"pink\")"}, "width": {"description": "", "name": "width", "group": "Random bits", "templateType": "anything", "definition": "random(2.50..5.00 #0.1) + random(0.01..0.09 #0.01)"}, "w": {"description": "", "name": "w", "group": "Calculations", "templateType": "anything", "definition": "ceil(width)"}, "verbs": {"description": "", "name": "verbs", "group": "Person", "templateType": "anything", "definition": "if(person['gender']='neutral','','s')"}, "height": {"description": "", "name": "height", "group": "Random bits", "templateType": "anything", "definition": "random(2.10..2.70 #0.1) + random(0.01..0.09 #0.01)"}, "h": {"description": "", "name": "h", "group": "Calculations", "templateType": "anything", "definition": "ceil(height)"}, "rall": {"description": "", "name": "rall", "group": "Calculations", "templateType": "anything", "definition": "rceiling + rwall1*2 + rwall2*2"}, "pronouns": {"description": "", "name": "pronouns", "group": "Person", "templateType": "anything", "definition": "person['pronouns']"}, "length": {"description": "", "name": "length", "group": "Random bits", "templateType": "anything", "definition": "random(3.50..8.00 #0.1) + random(0.01..0.09 #0.01)"}, "person": {"description": "", "name": "person", "group": "Person", "templateType": "anything", "definition": "random_person()"}, "rwall1": {"description": "", "name": "rwall1", "group": "Calculations", "templateType": "anything", "definition": "l*h"}, "rwall2": {"description": "", "name": "rwall2", "group": "Calculations", "templateType": "anything", "definition": "w*h"}, "rceiling": {"description": "", "name": "rceiling", "group": "Calculations", "templateType": "anything", "definition": "w*l"}, "l": {"description": "", "name": "l", "group": "Calculations", "templateType": "anything", "definition": "ceil(length)"}}, "functions": {}, "tags": ["random names", "taxonomy"], "variable_groups": [{"name": "Random bits", "variables": ["colour", "height", "width", "length"]}, {"name": "Person", "variables": ["person", "pronouns", "verbs"]}, {"name": "Calculations", "variables": ["h", "w", "l", "rwall1", "rwall2", "rceiling", "rall", "bucket_area", "buckets"]}], "parts": [{"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"scripts": {}, "minMarks": 0, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "choices": ["

Overestimate and therefore we round each measurement up.

", "

Underestimate and therefore we round each measurement down.

"], "showFeedbackIcon": true, "shuffleChoices": false, "displayColumns": "1", "variableReplacements": [], "marks": 0, "matrix": ["1", 0], "showCorrectAnswer": true, "maxMarks": 0, "type": "1_n_2"}], "showFeedbackIcon": true, "prompt": "

Is it better to overestimate or underestimate in this situation?

\n

[[0]]

", "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "rall", "showFeedbackIcon": true, "minValue": "rall", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "stepsPenalty": 0, "prompt": "

Rounding each measurement to the nearest metre, estimate the whole area to be painted {colour}.

\n

[[0]] m2

\n

", "steps": [{"scripts": {}, "variableReplacements": [], "type": "information", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "prompt": "

The room is {length}m long, {width}m wide, and {height}m high.

\n

Round each measurement in the direction you decided on above. 

", "marks": 0}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "ceil(length)", "showFeedbackIcon": true, "prompt": "

Round the length to the nearest metre.

", "minValue": "ceil(length)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.1", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "ceil(width)", "showFeedbackIcon": true, "prompt": "

Round the width to the nearest metre.

", "minValue": "ceil(width)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.1", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "ceil(height)", "showFeedbackIcon": true, "prompt": "

Round the height to the nearest metre.

", "minValue": "ceil(height)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.1", "showCorrectAnswer": true}], "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "buckets", "showFeedbackIcon": true, "minValue": "buckets", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "

One bucket of {colour} paint is enough to paint an area of 15m2. How many buckets should {person['name']} buy to ensure {pronouns['they']} {if(person['gender']='neutral','have','has')} enough paint?

\n

[[0]]

", "marks": 0}], "ungrouped_variables": [], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Estimate the number of buckets of paint to buy, by rounding measurements of a room up to the nearest metre and estimating the total area.

"}, "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

It is much better to have spare paint than not to have enough of it. So it is better to overestimate the area.

\n

Therefore, we round each measurement up.

\n

b)

\n

We round each of our measurements up to the nearest whole metre:

\n

Length: $\\var{length}\\,\\mathrm{m} \\approx \\var{l}\\,\\mathrm{m}$.

\n

Width: $\\var{width}\\,\\mathrm{m} \\approx \\var{w}\\,\\mathrm{m}$.

\n

Height: $\\var{height}\\,\\mathrm{m} \\approx \\var{h}\\,\\mathrm{m}$.

\n

The total area consists of five areas: two walls of $\\var{l}\\,\\text{m} \\times \\var{h}\\,\\text{m}$ (length by height); two walls of $\\var{w}\\,\\text{m} \\times \\var{h}\\,\\text{m}$ (width by height); and a ceiling of $\\var{l}\\,\\text{m} \\times \\var{w}\\,\\text{m}$ (length by width).

\n

\\[ \\begin{align}
\\var{l}\\,\\text{m} \\times \\var{h}\\,\\text{m} &= \\var{l*h}\\,\\text{m}^2
\\\\ \\var{w}\\,\\text{m} \\times \\var{h}\\,\\text{m} &= \\var{w*h}\\,\\text{m}^2
\\\\ \\var{l}\\,\\text{m} \\times \\var{w}\\,\\text{m} &= \\var{l*w}\\,\\text{m}^2
\\end{align}\\]

\n

Therefore, the total area {person['name']} needs to paint is

\n

\\[ \\var{2*l*h} + \\var{2*w*h} + \\var{l*w} \\,\\mathrm{m}^2 = \\var{rall}\\,\\mathrm{m}^2 \\text{.} \\]

\n

c)

\n

The exact number of buckets needed is

\n

\\[\\var{rall}\\,\\text{m}^2 \\div 15\\,\\text{m}^2 = \\var{rall/15} \\text{.}\\]

\n

{person['name']} can only buy a whole number of buckets, so {pronouns['they']} need{verbs} to decide between {buckets-1} and {buckets} paint buckets. As it is better to buy more paint than not buy enough, {pronouns['they']} should buy {buckets} buckets of {colour} paint.

"}, {"name": "Rounding and estimating calculations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "type": "question", "tags": ["estimation", "rounding", "taxonomy"], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"int": {"templateType": "anything", "name": "int", "description": "

6 random integers.

", "definition": "repeat(random(10..99 except tens),6)", "group": "Ungrouped variables"}, "integers": {"templateType": "range", "name": "integers", "description": "

Integers from 1 to 100.

", "definition": "1..100#1", "group": "Ungrouped variables"}, "sint": {"templateType": "anything", "name": "sint", "description": "

Small integer.

", "definition": "random(2..9)", "group": "Ungrouped variables"}, "tens": {"templateType": "range", "name": "tens", "description": "

Multiples of ten.

", "definition": "10..100#10", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "name": "b", "description": "

Integer (if rounded to 1 s.f. either 20 or 40).

", "definition": "random(15..24.99 #0.001 except integers) + random(0..20 #20)", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "name": "c", "description": "

Integer (if rounded to 1 s.f. either 10 or 20).

", "definition": "random(10..24.99 #0.001 except integers)", "group": "Ungrouped variables"}, "ran": {"templateType": "anything", "name": "ran", "description": "", "definition": "random(1..4)", "group": "Ungrouped variables"}, "a": {"templateType": "anything", "name": "a", "description": "

A decimal number.

", "definition": "random(1..40 #0.1 except integers)", "group": "Ungrouped variables"}}, "functions": {"int": {"parameters": [["digits", "list"]], "type": "number", "language": "jme", "definition": "if(\n len(digits)=0,\n 0,\n digits[0]+10*int(digits[1..len(digits)])\n)"}}, "statement": "

It is often appropriate to estimate calculations. The sign ≈ denotes \"approximately equal to\".

\n

In this question, approximate calculations by rounding the numbers in the question to 1 significant figure before calculating answers. 

", "variable_groups": [], "parts": [{"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(int[0], 1)", "showFeedbackIcon": true, "minValue": "siground(int[0], 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.5", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(int[1], 1)", "showFeedbackIcon": true, "minValue": "siground(int[1], 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.5", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(int[0], 1)*siground(int[1], 1)", "showFeedbackIcon": true, "minValue": "siground(int[0], 1)*siground(int[1], 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "1", "showCorrectAnswer": true}], "showCorrectAnswer": true, "prompt": "

Estimate $\\var{int[0]} \\times \\var{int[1]}$.

\n

[[0]]  $\\times$    [[1]]  $=$  [[2]] 

\n

Therefore, $\\var{int[0]} \\times \\var{int[1]} ≈$  [[2]].

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(sint, 1)", "showFeedbackIcon": true, "minValue": "siground(sint, 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.5", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(int[2], 1)", "showFeedbackIcon": true, "minValue": "siground(int[2], 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.5", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(sint, 1)*siground(int[2], 1)", "showFeedbackIcon": true, "minValue": "siground(sint, 1)*siground(int[2], 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showCorrectAnswer": true, "prompt": "

Estimate $\\var{sint} \\times \\var{int[2]}$.

\n

[[0]]  $\\times$    [[1]]  $=$  [[2]] 

\n

Therefore, $\\var{sint} \\times \\var{int[2]} ≈$  [[2]].

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(int[3], 1)", "showFeedbackIcon": true, "minValue": "siground(int[3], 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.5", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(int[4], 1)", "showFeedbackIcon": true, "minValue": "siground(int[4], 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.5", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(b, 1)", "showFeedbackIcon": true, "minValue": "siground(b, 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.5", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": true, "maxValue": "(siground(int[3], 1) - siground(int[4], 1)) / siground(b, 1) ", "showFeedbackIcon": true, "minValue": "(siground(int[3], 1) - siground(int[4], 1)) / siground(b, 1) ", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showCorrectAnswer": true, "prompt": "

Estimate $\\displaystyle \\frac{\\var{int[3]} - \\var{int[4]}}{\\var{b}}$.

\n

[[0]] $-$  [[1]] [[2]]   $=$ [[3]]

\n

Therefore, $\\displaystyle \\frac{\\var{int[3]} - \\var{int[4]}}{\\var{b}} ≈ $  [[3]].

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(int[5]*10, 1)", "showFeedbackIcon": true, "minValue": "siground(int[5]*10, 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.5", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(c, 1)", "showFeedbackIcon": true, "minValue": "siground(c, 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.5", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(a, 1)", "showFeedbackIcon": true, "minValue": "siground(a, 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "0.5", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "siground(int[5]*10, 1)/siground(c, 1) - siground(a, 1)", "showFeedbackIcon": true, "minValue": "siground(int[5]*10, 1)/siground(c, 1) - siground(a, 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showCorrectAnswer": true, "prompt": "

Estimate $\\displaystyle \\frac{\\var{int[5]*10 + ran}}{\\var{c}} - \\var{a}$.

\n

[[0]] [[1]]   $-$  [[2]]  $=$  [[3]]

\n

Therefore, $\\displaystyle \\frac{\\var{int[5]*10 + ran}}{\\var{c}} - \\var{a} ≈$  [[3]].

", "type": "gapfill"}], "ungrouped_variables": ["a", "int", "integers", "sint", "b", "c", "ran", "tens"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Estimate the result of an arithmetic operation by first rounding numbers to given significant figures

"}, "preamble": {"css": "fraction {\n display: inline-block;\n vertical-align: middle;\n}\nfraction > numerator, fraction > denominator {\n float: left;\n width: 100%;\n text-align: center;\n line-height: 2.5em;\n}\nfraction > numerator {\n border-bottom: 1px solid;\n padding-bottom: 5px;\n}\nfraction > denominator {\n padding-top: 5px;\n}\nfraction input {\n line-height: 1em;\n}\n\nfraction .part {\n margin: 0;\n}\n\n.table-responsive, .fractiontable {\n display:inline-block;\n}\n.fractiontable {\n padding: 0; \n border: 0;\n}\n\n.fractiontable .tddenom \n{\n text-align: center;\n}\n\n.fractiontable .tdnum \n{\n border-bottom: 1px solid black; \n text-align: center;\n}\n\n\n.fractiontable tr {\n height: 3em;\n}", "js": ""}, "advice": "

To round to 1 significant figure, we look at the first non-zero digit, increasing this digit by one if the following digit is 5 or more and keeping the digit the same if the following digit is below 5. We replace the rest of the digits by 0.

\n

a)

\n

\\[\\var{int[0]} \\times \\var{int[1]} ≈ \\text{ ?}\\]

\n

Rounding to 1 significant figure gives:

\n

\\[ \\begin{align}
\\var{siground(int[0], 1)} \\times \\var{siground(int[1], 1)} = \\var{siground(int[0], 1)*siground(int[1], 1)}
\\text{.} \\end{align} \\]

\n

b)

\n

\\[\\var{sint} \\times \\var{int[2]} ≈ \\text{ ?}\\]

\n

Rounding to 1 significant figure:

\n

\\[ \\begin{align}
\\var{siground(sint, 1)} \\times \\var{siground(int[2], 1)} = \\var{siground(sint, 1)*siground(int[2], 1)}
\\text{.} \\end{align} \\]

\n

A common mistake may be rounding $\\var{sint}$ to the nearest 10 instead of 1 significant figure (in this case the number itself already consists of 1 s.f. only).

\n

c)

\n

\\[\\displaystyle \\frac{\\var{int[3]} - \\var{int[4]}}{\\var{b}} ≈ \\text{ ?}\\]

\n

Rounding to 1 significant figure:

\n

\\[ \\begin{align}
\\displaystyle \\frac{\\var{siground(int[3], 1)} - \\var{siground(int[4], 1)}}{\\var{siground(b, 1)}}
&=\\frac{\\var{siground(int[3], 1) - siground(int[4], 1)}}{\\var{siground(b, 1)}}
\\\\&= \\var{(siground(int[3], 1) - siground(int[4], 1)) / siground(b,1)}
\\text{.} \\end{align} \\]

\n

d)

\n

\\[\\displaystyle \\frac{\\var{int[5]*10 + ran}}{\\var{c}} - \\var{a} ≈ \\text{ ?}\\]

\n

Rounding to 1 significant figure:

\n

\\[ \\begin{align}
\\displaystyle \\frac{\\var{siground(int[5]*10, 1)}}{\\var{siground(c, 1)}} - \\var{siground(a, 1)}
&= \\frac{\\var{siground(int[5]*10, 1)/10}}{\\var{siground(c, 1)/10}} - \\var{siground(a, 1)}
\\\\&= \\var{(siground(int[5]*10, 1))/siground(c, 1)} - \\var{siground(a, 1)}
\\\\&= \\var{siground(int[5]*10, 1)/siground(c, 1) - siground(a, 1)}
\\text{.} \\end{align} \\]

"}, {"name": "Rounding numbers to a given number of decimal places", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "type": "question", "tags": ["rounding", "taxonomy"], "variablesTest": {"condition": "", "maxRuns": "100"}, "variables": {"c1": {"templateType": "anything", "name": "c1", "description": "

Random number with 5 decimal places.

", "definition": "n_from_digits(cdig)*10^(-5) + random(1..5)", "group": "Ungrouped variables"}, "cdig": {"templateType": "anything", "name": "cdig", "description": "", "definition": "repeat(random(1..9), 5)", "group": "Ungrouped variables"}, "dp": {"templateType": "anything", "name": "dp", "description": "

Number of decimal places to round.

", "definition": "random(3..4)", "group": "Ungrouped variables"}}, "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)"}}, "statement": "

We can approximate numbers by rounding.

\n

Round $\\var{c1}$ to a given number of decimal places.

", "variable_groups": [], "parts": [{"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "precround(c1, 1)", "showFeedbackIcon": true, "minValue": "precround(c1, 1)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "precround(c1, 2)", "showFeedbackIcon": true, "minValue": "precround(c1, 2)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "maxValue": "precround(c1, dp)", "showFeedbackIcon": true, "minValue": "precround(c1, dp)", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showCorrectAnswer": true, "prompt": "

i)   $\\var{c1}$ rounded to 1 decimal place is:  [[0]]

\n

ii)   $\\var{c1}$ rounded to 2 decimal places is:  [[1]]

\n

iii)   $\\var{c1}$ rounded to {dp} decimal places is:  [[2]]

\n

", "type": "gapfill"}], "ungrouped_variables": ["dp", "cdig", "c1"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Round numbers to a given number of decimal places.

"}, "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 a number of decimal places, 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
\n

To round a number to a given number $n$ of decimal places, we look at the $n$th digit after the decimal point.

\n

We have $\\var{c1}$.

\n

i)

\n

We look at the first digit after the decimal point. This is $\\var{cdig[4]}$ and the following digit is $\\var{cdig[3]}$ so we round updown to get $\\var{precround(c1, 1)}$.

\n

ii)

\n

The second digit after the decimal point is $\\var{cdig[3]}$. It is followed by $\\var{cdig[2]}$ so we round updown to get $\\var{precround(c1, 2)}$.

\n

iii)

\n

The 3rd decimal place is $\\var{cdig[2]}$, followed by $\\var{cdig[1]}$. We get $\\var{precround(c1, 3)}$. The 4th decimal place is $\\var{cdig[1]}$, followed by $\\var{cdig[0]}$. We get $\\var{precround(c1, 4)}$.

\n

"}, {"name": "Limits of accuracy in measuring weight in a gym scenario", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}], "metadata": {"description": "

Work with lower and upper bounds for estimates of weight.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["weight1", "weight2", "total", "limit"], "statement": "

We use lower and upper bounds to describe intervals. We can use them to identify all the possible values that could round to a given number.

\n\n

For example, for 50 rounded to the nearest ten, the lowest bound is 45 since 45 is the lowest value that rounds to 50. The upper bound is 55 since 55 is the lowest value that rounds to 60 (the following ten).

", "variable_groups": [], "rulesets": {}, "type": "question", "advice": "

a)

\n

When using inequality symbols to show an error interval for $x$, we use

\n

\\[\\text{lower bound} \\leq x \\lt \\text{upper bound}\\]

\n

since the lower bound is included within the interval, while the upper bound is not.

\n

\n

b)

\n

To find bounds, we divide the degree of accuracy by 2 and subtract/add to our estimate to get lower and upper bounds respectively.

\n

The degree of accuracy is to the nearest 10 kg.

\n

\\[10 \\text{ kg} \\div 2 = 5 \\text{ kg}\\]

\n

\\[\\begin{align} \\text{Lower bound} = \\var{weight1} - 5 &= \\var{weight1 - 5} \\text{ kg}
\\\\\\text{Upper bound} = \\var{weight1} + 5 &= \\var{weight1 + 5} \\text{ kg}\\end{align}\\]

\n

\n

c)

\n

To calculate the lower bound of Alex and Cathy's total weight, we add the lower bounds of their individual weights:

\n

\\[ \\var{weight1 - 5} \\text{ kg} + \\var{weight2 - 5} \\text{ kg} = \\var{weight1 + weight2 - 10} \\text{ kg.}\\]

\n

Similarly for the upper bound,

\n

\\[ \\var{weight1 + 5} \\text{ kg} + \\var{weight2 + 5} \\text{ kg} = \\var{weight1 + weight2 + 10} \\text{ kg.}\\]

\n

\n

d)

\n

The upper bound for their total weight is $\\var{weight1 + weight2 + 10}$ kg.

\n

The weight limit is $\\var{limit}$ kg.

\n

Hence, the upper bound for their total weight is greater than the weight limit.

\n

\n

e)

\n

We have found that the upper bound is above the weight limit, so we won't consider the first option.

\n

To decide between the second and the third option, we compare the lower bound for Alex's and Cathy's total weight to the weight limit.

\n

Here, the lower bound ($\\var{weight1 + weight2 - 10}$ kg) is in fact less than the weight limit $\\var{limit}$ kg.

\n

Therefore, we cannot confirm nor deny whether it is safe for them to use the lift given the information we know.

", "parts": [{"scripts": {}, "gaps": [{"shuffleChoices": true, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["

<

", "

>

", "

", "

"], "distractors": ["Incorrect, as the lower bound is included in the interval", "Incorrect, as the lower bound is the lowest possible value within the interval", "", "Incorrect, as the lower bound is the lowest possible value within the interval"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": [0, 0, "1", 0], "displayType": "dropdownlist"}, {"shuffleChoices": true, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["

<

", "

>

", "

", "

"], "distractors": ["", "Incorrect, as the upper bound is higher than any value within the interval", "Incorrect, as the upper bound is NOT included in the interval", "Incorrect, as the upper bound is higher than any value within the interval"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": ["1", 0, 0, 0], "displayType": "dropdownlist"}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

Suppose we are given a rounded variable such as weight. Select the inequality signs that denote the interval that contains the true value before rounding:

\n

Lower bound  [[0]]weight  [[1]]upper bound

", "variableReplacementStrategy": "originalfirst"}, {"scripts": {}, "gaps": [{"correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "marks": 1, "minValue": "{weight1} - 5", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "{weight1} - 5", "mustBeReduced": false, "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "marks": 1, "minValue": "{weight1} + 5", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "{weight1} + 5", "mustBeReduced": false, "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

Alex is filling out an online form to join a new gym in Newcastle. One of the fields is asking for his weight in kg rounded to the nearest 10kg. Alex rounds his weight and writes down {weight1} kg. What are the upper and lower bounds for his weight?

\n

Lower bound =  [[0]]kg

\n

Upper bound =  [[1]]kg

", "variableReplacementStrategy": "originalfirst"}, {"scripts": {}, "gaps": [{"correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "marks": 1, "minValue": "{weight1} + {weight2} - 10", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "{weight1} + {weight2} - 10", "mustBeReduced": false, "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "marks": 1, "minValue": "{weight1} + {weight2} + 10", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "{weight1} + {weight2} + 10", "mustBeReduced": false, "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

Alex's friend Cathy is also joining the gym. She writes {weight2} kg in the weight field.

\n

Suppose Alex and Cathy meet up to go to the gym together for the first time. Their gym is located on the 8th floor of the building. They can either use the lift or the staircase to get there. Cathy wants to be active and go up the stairs but Alex doesn't want to do any exercise before he changes to his gym clothes and wants to use the lift. The weight limit for the lift is {limit} kg.

\n

Calculate the lower and upper bounds for their total weight.

\n

Lower bound for Alex's weight $+$ Cathy's weight $=$  [[0]]kg

\n

Upper bound for Alex's weight $+$ Cathy's weight $=$  [[1]]kg

", "variableReplacementStrategy": "originalfirst"}, {"scripts": {}, "gaps": [{"shuffleChoices": false, "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "choices": ["

>

", "

<

", "

=

"], "distractors": ["", "", ""], "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "variableReplacements": [], "matrix": ["1", 0, 0], "displayType": "dropdownlist"}], "type": "gapfill", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

Select the correct inequality sign between the following:

\n

Upper bound for Alex's and Cathy's total weight [[0]] Weight limit for the lift

\n

", "variableReplacementStrategy": "originalfirst"}, {"shuffleChoices": false, "variableReplacements": [], "showCorrectAnswer": true, "displayColumns": 0, "showFeedbackIcon": true, "prompt": "

Given what we know, what is our conclusion? Is it safe for them to take the lift together without going over the allowed weight limit?

\n

\n

\n

", "type": "1_n_2", "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "minMarks": 0, "choices": ["

It is perfectly safe for them to use the lift because the upper bound for their total weight is below the allowed weight limit.

", "

We cannot be sure whether it is safe for them to use the lift because the upper bound for their total weight is above the allowed weight limit, while the lower bound is still below the weight limit.

", "

We can confidently say that it is unsafe for them to use the lift because their total weight exceeds the weight limit in all posibilities.

"], "marks": 0, "distractors": ["", "", ""], "matrix": [0, "2", 0], "displayType": "radiogroup"}], "tags": ["limits of accuracy", "lower bounds", "taxonomy", "upper bounds"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"weight2": {"description": "", "definition": "random(total-weight1)", "group": "Ungrouped variables", "name": "weight2", "templateType": "anything"}, "weight1": {"description": "", "definition": "random(50..100 #10)", "group": "Ungrouped variables", "name": "weight1", "templateType": "anything"}, "total": {"description": "", "definition": "random(140..180 #10)", "group": "Ungrouped variables", "name": "total", "templateType": "anything"}, "limit": {"description": "", "definition": "total + random(0..9.5 #0.5)", "group": "Ungrouped variables", "name": "limit", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}], "extensions": ["random_person"], "custom_part_types": [], "resources": []}