// Numbas version: finer_feedback_settings {"name": "Decimal places", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["mes", "ans3", "r1", "r2", "r3", "ans1", "ans2", "grorle", "a3", "incorleave", "a1", "grorle1", "grorle2", "a2", "incorleave2", "incorleave1", "mes2", "n1", "n2", "n3", "mes1"], "name": "Decimal places", "tags": ["arithmetic", "Arithmetic", "decimal places", "decimals", "rounding", "strict rounding", "vet"], "advice": "
1. As the second decimal place for {a1} is {grorle} we {incorleave} the first decimal place and the answer is {dpformat(ans1,1)} to 1 decimal place.
\n{mes}
\n \n2. The third decimal place of {a2} is {grorle1} and so we {incorleave1} the second decimal place and the answer is {dpformat(ans2,2)} to 2 decimal places.
\n{mes1}
\n3. The fourth decimal place of {a3} is {grorle2} and so we {incorleave2} the third decimal place and the answer is {dpformat(ans3,3)} to 3 decimal places.
\n{mes2}
", "rulesets": {}, "parts": [{"stepsPenalty": 0, "prompt": "$\\var{a1}$ to $\\var{n1}$ decimal place = [[0]]
\n$\\var{a2}$ to $\\var{n2}$ decimal places = [[1]]
\n$\\var{a3}$ to $\\var{n3}$ decimal places = [[2]]
\n \n ", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "precision": 1, "maxValue": "ans1", "minValue": "ans1", "variableReplacementStrategy": "originalfirst", "strictPrecision": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "precision": 2, "maxValue": "ans2", "minValue": "ans2", "variableReplacementStrategy": "originalfirst", "strictPrecision": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "precision": 3, "maxValue": "ans3", "minValue": "ans3", "variableReplacementStrategy": "originalfirst", "strictPrecision": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "steps": [{"prompt": "Rounding a number to a given number of decimal places.
\nA decimal has a number of places after the decimal point e.g. $1.023$ has $3$ places, $10$ has none, $23.35689234$ has $8$ places.
\nIt is often the case that we want to present the result of a calculation to a specified number of places, the implication being that this is accurate enough for our purposes.
\nThe way to do this is as follows:
\nTake the decimal and count along the number of places we want e.g. suppose we want $2.1372$ to $2$ decimal places. We have $2.13$ on counting along $2$ places.
\nBut we are not finished as we have to look at the next decimal place in $2.1372$.
\nIf this is $4$ or below we keep $2.13$, but if it is $5$ or above we change the $3$ to $4$ i.e. increase the second place.
\nSo to $2$ decimal places $2.1372=2.14$ as the $7$ in the third place tells us that we have to increase $3$ in the second place to $4$.
\nHowever to three decimal places $2.1372 = 2.137$ as the $2$ in the fourth place tells us not to change the third place.
\nSo, for example, suppose we want to reduce the weight of a dog by $12\\%$ and the original weight we want to reduce is $21.4$kgs then our calculations give:
\n$\\displaystyle 12\\% \\text{ of weight } = \\frac{12}{100} \\times 21.4=2.568$kg of weight to reduce by.
\nNow it is rather silly to require that degree of accuracy and so we may say in this case that one decimal place is sufficient.
\n$2.568 = 2.6$kgs to one decimal place as the $6$ in the second place tells us to increase the $5$ to $6$.
\nOther examples:
\n$1.375=1.38$ to $2$ decimal places (the $5$ in the third place tells us to increase the $7$ to $8$ in the second place)
\n$27.2789= 27.279$ to $3$ decimal places.
\n$134.975 = 135.0$ to one decimal place (the $7$ in the second place tells us to increase the $9$ by $1$, but it then becomes $0$ with $1$ left over to add to the $134$ to give $135$).
\n$0.8998 = 0.900$ to $3$ decimal places (why?)
\nIMPORTANT
\nNote that in the last two examples, we have included $0$ in $135.0$ and two $0$s for $0.900$.
\nThis is because we have asked for a certain number of decimal places and it is correct to include $0$s to make sure that the answer has the right number of entries in the decimal places. If you miss out the $0$s then it will be marked as incorrect.
\nAnother example:
\n$1.357983$ to $4$ decimal places is input as $1.3580$ and not as $1.358$.
\n \n ", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "marks": 0, "scripts": {}, "showCorrectAnswer": true, "type": "gapfill"}, {"precisionType": "dp", "prompt": "0.28923 to 3 decimal places
", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "precision": 3, "maxValue": "0.290+0.001", "minValue": "0.290-0.001", "variableReplacementStrategy": "originalfirst", "strictPrecision": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "extensions": [], "statement": "You can get help on rounding by clicking on Show steps.
\nOr look at the BBC Bitesize Page on decimal places.
\nAnswer the following questions.
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"grorle": {"definition": "if(ans1>a1,\"greater than 4\", \"less than 5\")", "templateType": "anything", "group": "Ungrouped variables", "name": "grorle", "description": ""}, "incorleave1": {"definition": "if(ans2>a2,\"increase\", \"do not increase\")", "templateType": "anything", "group": "Ungrouped variables", "name": "incorleave1", "description": ""}, "r1": {"definition": "random(2..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "r1", "description": ""}, "r2": {"definition": "random(3,4)", "templateType": "anything", "group": "Ungrouped variables", "name": "r2", "description": ""}, "r3": {"definition": "random(4,5)", "templateType": "anything", "group": "Ungrouped variables", "name": "r3", "description": ""}, "ans1": {"definition": "precround(a1,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "ans2": {"definition": "precround(a2,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "description": ""}, "ans3": {"definition": "precround(a3,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans3", "description": ""}, "grorle2": {"definition": "if(ans3>a3,\"greater than 4\", \"less than 5\")", "templateType": "anything", "group": "Ungrouped variables", "name": "grorle2", "description": ""}, "incorleave": {"definition": "if(ans1>a1,\"increase\", \"do not increase\")", "templateType": "anything", "group": "Ungrouped variables", "name": "incorleave", "description": ""}, "a1": {"definition": "random(11111..111111#2)/10^r1", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "grorle1": {"definition": "if(ans2>a2,\"greater than 4\", \"less than 5\")", "templateType": "anything", "group": "Ungrouped variables", "name": "grorle1", "description": ""}, "a3": {"definition": "random(1111111..11111111#2)/10^r3", "templateType": "anything", "group": "Ungrouped variables", "name": "a3", "description": ""}, "a2": {"definition": "random(11111..111111#2)/10^r2", "templateType": "anything", "group": "Ungrouped variables", "name": "a2", "description": ""}, "incorleave2": {"definition": "if(ans3>a3,\"increase\", \"do not increase\")", "templateType": "anything", "group": "Ungrouped variables", "name": "incorleave2", "description": ""}, "mes": {"definition": "if(isint(10^(n1-1)*ans1),'Note that we have 0 in the first decimal place. You have to include this.',' ')", "templateType": "anything", "group": "Ungrouped variables", "name": "mes", "description": ""}, "mes2": {"definition": "if(isint(10^(n3-1)*ans3),'Note that we have had to include one or more 0s in order to get the correct number of decimal places' ,' ')", "templateType": "anything", "group": "Ungrouped variables", "name": "mes2", "description": ""}, "n1": {"definition": "1", "templateType": "anything", "group": "Ungrouped variables", "name": "n1", "description": ""}, "n2": {"definition": "2", "templateType": "anything", "group": "Ungrouped variables", "name": "n2", "description": ""}, "n3": {"definition": "3", "templateType": "anything", "group": "Ungrouped variables", "name": "n3", "description": ""}, "mes1": {"definition": "if(isint(10^(n2-1)*ans2),'Note that we have had to include one or more 0s in order to get the correct number of decimal places' ,' ')", "templateType": "anything", "group": "Ungrouped variables", "name": "mes1", "description": ""}}, "metadata": {"description": "Rounding decimals.
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}