// Numbas version: exam_results_page_options {"name": "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": [{"functions": {}, "ungrouped_variables": ["place", "num", "name", "ans1", "name1", "est1", "est2", "ans2", "price"], "name": "Q4 (Percentage error when estimating total cost of shop items)", "tags": ["rebelmaths"], "advice": "

Part 1:

\n

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

\n

$ Estimate = €\\var{est1}$

\n

Percentage error:

\n

$abs(\\frac{\\var{est1} - \\var{price}}{\\var{price}}) \\times 100 = \\var{ans1}$%

\n

Part 2:

\n

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

\n

$ Estimate = € \\var{est2}$

\n

Percentage error:

\n

$abs(\\frac{\\var{est2} - \\var{price}}{\\var{price}}) \\times 100 = \\var{ans2}$%

\n

", "rulesets": {}, "parts": [{"stepsPenalty": 0, "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]]%

", "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": false, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "steps": [{"prompt": "

You need to figure out both the guess and the correct value

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "marks": 0, "scripts": {}, "showCorrectAnswer": true, "type": "gapfill"}, {"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]]%

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "precision": "1", "maxValue": "{ans2}", "minValue": "{ans2}", "variableReplacementStrategy": "originalfirst", "strictPrecision": false, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "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:

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"name": {"definition": "random('Robert','John','Liam','Karl','Victor')", "templateType": "anything", "group": "Ungrouped variables", "name": "name", "description": ""}, "ans1": {"definition": "(abs(est1-price)/price)*100", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "price": {"definition": "num[0]+num[1]+num[2]+num[3]", "templateType": "anything", "group": "Ungrouped variables", "name": "price", "description": ""}, "num": {"definition": "shuffle(3.5..14.5#0.05)[0..4]", "templateType": "anything", "group": "Ungrouped variables", "name": "num", "description": ""}, "place": {"definition": "random('shop','supermarket','corner shop')", "templateType": "anything", "group": "Ungrouped variables", "name": "place", "description": ""}, "est1": {"definition": "floor(num[0])+floor(num[1])+floor(num[2])+floor(num[3])", "templateType": "anything", "group": "Ungrouped variables", "name": "est1", "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": ""}, "name1": {"definition": "random('Susan','Rose','Lisa','Karen','Kate','Vicky')", "templateType": "anything", "group": "Ungrouped variables", "name": "name1", "description": ""}, "ans2": {"definition": "(abs(est2-price)/price)*100", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "description": ""}}, "metadata": {"description": "

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}]}]}], "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}]}