// Numbas version: exam_results_page_options {"name": "Simon's copy of Q4 (Percentage error when estimating total cost of shop items)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "

Work out the positive value of the error (denoted by vertical lines below, e.g. |5-7| is 2 not -2), divide by the exact value, then multiply by 100 to convert to a percentage. Remember to give answers to 1 d.p. as requested.

\n

The true price is $\\var{num[0]}+\\var{num[1]}+\\var{num[2]}+\\var{num[3]} = €\\var{price}$

\n

(a)

\n

$\\var{name}$ ignores the cent part and estimates:

\n

Estimate $=\\var{floor(num[0])}+\\var{floor(num[1])}+\\var{floor(num[2])}+\\var{floor(num[3])} = €\\var{est1}$

\n

Percentage error:

\n

$\\frac{|\\var{est1} - \\var{price}|}{\\var{price}} \\times 100 = \\var{precround(ans1,1)}$%

\n

(b)

\n

$\\var{name1}$ rounds to the nearest euro and estimates:

\n

Estimate $= \\var{precround(num[0],0)}+\\var{precround(num[1],0)}+\\var{precround(num[2],0)}+\\var{precround(num[3],0)} = € \\var{est2}$

\n

Percentage error:

\n

$\\frac{|\\var{est2} - \\var{price}|}{\\var{price}} \\times 100 = \\var{precround(ans2,1)}$%

\n

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

First you need to work out both the exact total, and the approximated total.

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

$\\var{name}$ estimates the total cost by ignoring the cent part in the cost of each item. Calculate the percentage error in her estimate.

\n

[[0]]%

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

$\\var{name1}$ estimates the total cost by rounding the cost of each item to the nearest euro. Calculate the percentage error in his estimate.

\n

[[0]]%

", "showCorrectAnswer": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "scripts": {}, "sortAnswers": false, "unitTests": [], "variableReplacementStrategy": "originalfirst"}], "tags": [], "name": "Simon's copy of Q4 (Percentage error when estimating total cost of shop items)", "extensions": [], "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": ["place", "num", "name", "ans1", "name1", "est1", "est2", "ans2", "price"], "preamble": {"js": "", "css": ""}, "functions": {}, "rulesets": {}, "metadata": {"description": "

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Four items in a $\\var{place}$ cost €{dpformat(num[0],2)}, €{dpformat(num[1],2)}, €{dpformat(num[2],2)} and €{dpformat(num[3],2)}. 

\n

Calculate correct to one decimal place:

", "variables": {"price": {"definition": "num[0]+num[1]+num[2]+num[3]", "templateType": "anything", "group": "Ungrouped variables", "name": "price", "description": ""}, "ans2": {"definition": "(abs(est2-price)/price)*100", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "description": ""}, "ans1": {"definition": "(abs(est1-price)/price)*100", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "name": {"definition": "random('Robert','John','Liam','Karl','Victor')", "templateType": "anything", "group": "Ungrouped variables", "name": "name", "description": ""}, "name1": {"definition": "random('Susan','Rose','Lisa','Karen','Kate','Vicky')", "templateType": "anything", "group": "Ungrouped variables", "name": "name1", "description": ""}, "num": {"definition": "shuffle(3.5..14.5#0.05)[0..4]", "templateType": "anything", "group": "Ungrouped variables", "name": "num", "description": ""}, "est1": {"definition": "floor(num[0])+floor(num[1])+floor(num[2])+floor(num[3])", "templateType": "anything", "group": "Ungrouped variables", "name": "est1", "description": ""}, "place": {"definition": "random('shop','supermarket','corner shop')", "templateType": "anything", "group": "Ungrouped variables", "name": "place", "description": ""}, "est2": {"definition": "precround(num[0],0)+precround(num[1],0)+precround(num[2],0)+precround(num[3],0)", "templateType": "anything", "group": "Ungrouped variables", "name": "est2", "description": ""}}, "type": "question", "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}