// Numbas version: exam_results_page_options {"name": "2.3 Combining operations Q4", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

order of operations

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "variables": {"y2": {"definition": "random(2..8)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "y2"}, "y0": {"definition": "random(4..9)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "y0"}, "y1": {"definition": "random(2..5)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "y1"}}, "advice": "", "ungrouped_variables": ["y0", "y1", "y2"], "name": "2.3 Combining operations Q4", "rulesets": {}, "preamble": {"css": "", "js": ""}, "tags": [], "variable_groups": [], "statement": "

Use the rules for order of operations to calculate the following:

", "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"type": "numberentry", "marks": 1, "unitTests": [], "variableReplacementStrategy": "originalfirst", "maxValue": "y0+y0*y1-y2", "showCorrectAnswer": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "prompt": "

What is $\\var{y0}+\\var{y0}\\times\\var{y1}-\\var{y2}$?

", "customMarkingAlgorithm": "selectiveFeedback:\n switch (studentNumber=(y0+y0)*y1-y2,\n (incorrect(\"You appear to have completed the addition before the multiplication or subtraction. Remember that multiplication has higher precedence than addition.\"); end()),\n studentNumber=y0+y0*(y1-y2),\n (incorrect(\"You appear to have completed the subtraction before the multiplication or addition. Remember that multiplication has higher precedence than subtraction.\"); end()),\n studentNumber=(y0+y0)*(y1-y2),\n (incorrect(\"You appear to have completed the addition and subtraction before the multiplication. Remember that multiplication has higher precedence than addition or subtraction.\"); end()),\"\"\n )\n\nmark (Mark the student's answer):\n apply(selectiveFeedback);\n apply(validNumber);\n apply(numberInRange);\n assert(numberInRange,end());\n if(isFraction,\n apply(cancelled)\n ,\n apply(correctPrecision)\n )\n", "minValue": "y0+y0*y1-y2", "mustBeReduced": false, "correctAnswerStyle": "plain", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "variableReplacements": [], "scripts": {}, "extendBaseMarkingAlgorithm": true, "allowFractions": false}], "extensions": [], "functions": {}, "type": "question", "contributors": [{"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}, {"name": "Jim Pettigrew", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2037/"}, {"name": "Susan McGlynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2148/"}]}]}], "contributors": [{"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}, {"name": "Jim Pettigrew", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2037/"}, {"name": "Susan McGlynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2148/"}]}