// Numbas version: exam_results_page_options {"name": "Simon's copy of Q2 (Percentage Error with adding and Subtracting)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "

Solve the following correct to two decimal places.

", "ungrouped_variables": ["num1", "num2", "num3", "ans", "num1a", "num2a", "num3a", "ans1"], "name": "Simon's copy of Q2 (Percentage Error with adding and Subtracting)", "extensions": [], "variables": {"num2": {"templateType": "anything", "definition": "random(1.8..3.5#0.01)", "group": "Ungrouped variables", "name": "num2", "description": ""}, "ans": {"templateType": "anything", "definition": "(abs(num3-(num1+num2))/(num1+num2))*100", "group": "Ungrouped variables", "name": "ans", "description": ""}, "num1": {"templateType": "anything", "definition": "random(2.8..4#0.01)", "group": "Ungrouped variables", "name": "num1", "description": ""}, "num3": {"templateType": "anything", "definition": "precround(num1,1)+ precround(num2,1)", "group": "Ungrouped variables", "name": "num3", "description": ""}, "ans1": {"templateType": "anything", "definition": "(abs(num3a-(num1a-num2a))/(num1a-num2a))*100", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "num2a": {"templateType": "anything", "definition": "random(6.1..8.9#0.01 except 7 except 8)", "group": "Ungrouped variables", "name": "num2a", "description": ""}, "num1a": {"templateType": "anything", "definition": "random(11.1..14.9#0.01 except 12 except 13 except 14)", "group": "Ungrouped variables", "name": "num1a", "description": ""}, "num3a": {"templateType": "anything", "definition": "precround(num1a,1)- precround(num2a,1)", "group": "Ungrouped variables", "name": "num3a", "description": ""}}, "metadata": {"description": "

Percentage Error

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"scripts": {}, "unitTests": [], "prompt": "

The answer to $\\var{num1} + \\var{num2}$ was given as $\\var{num3}$.

\n

What was the percentage error?

\n

[[0]]%

", "extendBaseMarkingAlgorithm": true, "marks": 0, "steps": [{"prompt": "

Remember to find the difference between the approximate answer and the exact answer. Then we divide by the EXACT answer, then multiply by 100 to convert to a percentage.

\n

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

The answer to $\\var{num1a} - \\var{num2a}$ was given as $\\var{num3a}$.

\n

What was the percentage error?

\n

[[0]]%

", "extendBaseMarkingAlgorithm": true, "marks": 0, "showCorrectAnswer": true, "type": "gapfill", "gaps": [{"precisionType": "dp", "scripts": {}, "marks": 1, "extendBaseMarkingAlgorithm": true, "precision": "2", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "minValue": "{ans1}", "mustBeReducedPC": 0, "type": "numberentry", "showPrecisionHint": false, "unitTests": [], "precisionPartialCredit": 0, "mustBeReduced": false, "variableReplacements": [], "strictPrecision": false, "showCorrectAnswer": true, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "precisionMessage": "You have not given your answer to the correct precision.", "customMarkingAlgorithm": "", "allowFractions": false, "variableReplacementStrategy": "originalfirst", "maxValue": "{ans1}"}], "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacements": [], "sortAnswers": false, "variableReplacementStrategy": "originalfirst"}], "tags": [], "variable_groups": [], "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 2 d.p. as requested.

\n

(a)

\n

$\\var{num1} + \\var{num2} =\\var{num1+num2}$

\n

$\\frac{|\\var{num3} - \\var{num1+num2}|}{\\var{num1+num2}} \\times 100 = \\var{precround(ans,2)}$

\n

(b)

\n

$\\var{num1a} - \\var{num2a}=\\var{num1a-num2a}$

\n

$\\frac{|\\var{num3a} - \\var{num1a-num2a}|}{\\var{num1a-num2a}} \\times 100 = \\var{precround(ans1,2)}$

", "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": "(num3<>num1+num2) and (num3a>num1a-num2a+0.01)"}, "preamble": {"js": "", "css": ""}, "functions": {}, "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/"}]}