// Numbas version: finer_feedback_settings {"name": "Distributive law: expanding one set of brackets", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "", "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}, "parts": [{"showCorrectAnswer": true, "marks": 0, "stepsPenalty": "1", "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "prompt": "
The expression $\\var{pmult}(\\var{pxcoeff}x+\\var{pconstant})$ is factorised (written as a product), we can expand the expression (so it is written as a sum) to get
\n[[0]] $x$ + [[1]]
", "steps": [{"marks": 0, "prompt": "The number in front of the bracket is multiplying the bracketed term, that is, each term in the brackets.
\n\nFor example, $3(5x+6)$ means $3\\times (5x+6)$ which means $3\\times 5x+3\\times 6$, and so expanding $3(5x+6)$ gives $15x+18$.
", "variableReplacements": [], "type": "information", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}}], "gaps": [{"marks": 1, "maxValue": "{pmult*pxcoeff}", "variableReplacements": [], "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "allowFractions": false, "showPrecisionHint": false, "minValue": "{pmult*pxcoeff}", "correctAnswerFraction": false, "scripts": {}}, {"marks": 1, "maxValue": "{pmult*pconstant}", "variableReplacements": [], "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "allowFractions": false, "showPrecisionHint": false, "minValue": "{pmult*pconstant}", "correctAnswerFraction": false, "scripts": {}}], "scripts": {}}, {"showCorrectAnswer": true, "marks": 0, "stepsPenalty": "1", "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "prompt": "Expand $\\var{nmult}(\\var{nxcoeff}a-\\var{-nconstant})$.
\n[[0]] $a$ + [[1]]
", "steps": [{"marks": 0, "prompt": "The number in front of the bracket is multiplying the bracketed term, that is, each term in the brackets. Further, recall that a negative multiplied by a negative is a positive.
\n\nFor example, $-3(5a-6)$ means $-3\\times (5a-6)$ which means $(-3)\\times 5a+(-3)\\times (-6)$, and so expanding $3(5a+6)$ gives $-15a+18$.
", "variableReplacements": [], "type": "information", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}}], "gaps": [{"marks": 1, "maxValue": "{nmult*nxcoeff}", "variableReplacements": [], "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "allowFractions": false, "showPrecisionHint": false, "minValue": "{nmult*nxcoeff}", "correctAnswerFraction": false, "scripts": {}}, {"marks": 1, "maxValue": "{nmult*nconstant}", "variableReplacements": [], "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "allowFractions": false, "showPrecisionHint": false, "minValue": "{nmult*nconstant}", "correctAnswerFraction": false, "scripts": {}}], "scripts": {}}, {"showCorrectAnswer": true, "marks": 0, "stepsPenalty": "1", "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "prompt": "Expand $-(\\var{cx}x-\\var{-cy}y+\\var{cc})$.
\n[[0]] $x$ + [[1]] $y$ + [[2]]
", "steps": [{"marks": 0, "prompt": "A negative sign in front of a bracket is a common way to signify $-1$ times the bracketed term. The result is that it changes the sign of everything in the brackets.
\n\nFor example, $-(5x-y+6)$ means $-1\\times (5x-y+6)$ which means $(-1)\\times 5x+(-1)\\times (-y)+(-1)\\times 6$, and so expanding $-(5x-y+6)$ gives $-5x+y-6$.
", "variableReplacements": [], "type": "information", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}}], "gaps": [{"marks": 1, "maxValue": "{-cx}", "variableReplacements": [], "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "allowFractions": false, "showPrecisionHint": false, "minValue": "{-cx}", "correctAnswerFraction": false, "scripts": {}}, {"marks": 1, "maxValue": "{-cy}", "variableReplacements": [], "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "allowFractions": false, "showPrecisionHint": false, "minValue": "{-cy}", "correctAnswerFraction": false, "scripts": {}}, {"marks": 1, "maxValue": "{-cc}", "variableReplacements": [], "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "allowFractions": false, "showPrecisionHint": false, "minValue": "{-cc}", "correctAnswerFraction": false, "scripts": {}}], "scripts": {}}], "statement": "", "ungrouped_variables": [], "variables": {"pmult": {"group": "part a", "name": "pmult", "templateType": "anything", "definition": "primes[0]", "description": ""}, "pxcoeff": {"group": "part a", "name": "pxcoeff", "templateType": "anything", "definition": "primes[1]", "description": ""}, "pconstant": {"group": "part a", "name": "pconstant", "templateType": "anything", "definition": "primes[2]", "description": ""}, "primes": {"group": "part a", "name": "primes", "templateType": "anything", "definition": "shuffle([2,3,5,7,11])[0..3]", "description": ""}, "nxcoeff": {"group": "part b", "name": "nxcoeff", "templateType": "anything", "definition": "random(2..12)", "description": ""}, "nconstant": {"group": "part b", "name": "nconstant", "templateType": "anything", "definition": "random(-12..-2)", "description": ""}, "cy": {"group": "part c", "name": "cy", "templateType": "anything", "definition": "random(-12..1)", "description": ""}, "nmult": {"group": "part b", "name": "nmult", "templateType": "anything", "definition": "random(-12..-2)", "description": ""}, "cc": {"group": "part c", "name": "cc", "templateType": "anything", "definition": "random(2..12)", "description": ""}, "cx": {"group": "part c", "name": "cx", "templateType": "anything", "definition": "random(2..12)", "description": ""}}, "rulesets": {}, "variable_groups": [{"variables": ["pmult", "pxcoeff", "pconstant", "primes"], "name": "part a"}, {"variables": ["nmult", "nxcoeff", "nconstant"], "name": "part b"}, {"variables": ["cx", "cy", "cc"], "name": "part c"}], "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": ""}, "preamble": {"js": "", "css": ""}, "name": "Distributive law: expanding one set of brackets", "tags": ["algebra", "distributive law", "expanding", "expanding brackets"], "showQuestionGroupNames": false, "question_groups": [{"questions": [], "pickQuestions": 0, "pickingStrategy": "all-ordered", "name": ""}], "contributors": [{"name": "Owen Jepps", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1195/"}], "resources": []}]}], "contributors": [{"name": "Owen Jepps", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1195/"}]}