// Numbas version: finer_feedback_settings {"name": "36.b Simplifying multiplication 2 - multiples of variables with coefficients", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "36.b Simplifying multiplication 2 - multiples of variables with coefficients", "tags": [], "metadata": {"description": "

Simplifying single term expressions involving more than one letter.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Simplify the following expression.

\n

{MultiplicationToSimplify}

", "advice": "

To simplify multiplication we need to multiply all numbers together and collect any of the same variables together. Remember that $\\var{Coefficient1}\\var{Letter1}$ just means $\\var{Coefficient1}\\times\\var{Letter1}$.

\n

First we will collect and multiply all of the numbers together. We have to multiply $\\simplify[UnitFactor,alwaysTimes]{{NumbersToMultiply[TermOrder[0]]}*{NumbersToMultiply[TermOrder[1]]}*{NumbersToMultiply[TermOrder[2]]}}$ together which gives us a coefficient of $\\var{AnswerCoefficient}$.

\n

{Advice}

\n

Use this link to find some resources which will help you revise this topic.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"LetterList": {"name": "LetterList", "group": "Ungrouped variables", "definition": "[\"a\",\"b\",\"c\",\"d\",\"p\",\"t\",\"s\",\"n\",\"m\",\"x\",\"y\",\"z\"]", "description": "", "templateType": "anything", "can_override": false}, "Letter1": {"name": "Letter1", "group": "Ungrouped variables", "definition": "random(LetterList)", "description": "", "templateType": "anything", "can_override": false}, "Letter2": {"name": "Letter2", "group": "Ungrouped variables", "definition": "random(LetterList except Letter1)", "description": "", "templateType": "anything", "can_override": false}, "Number1": {"name": "Number1", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "Number2": {"name": "Number2", "group": "Ungrouped variables", "definition": "random(2..5 except Number1)", "description": "", "templateType": "anything", "can_override": false}, "TermChoice": {"name": "TermChoice", "group": "Ungrouped variables", "definition": "random([Coefficient1+Letter1, Coefficient2+Letter2, string(Number1), string(Number2)] except random(Coefficient2+Letter2, string(Number1), string(Number2)),[Coefficient1+Letter1,Coefficient2+Letter1,string(Number1)],[Coefficient1+Letter1, Letter2, string(Number1)])", "description": "", "templateType": "anything", "can_override": false}, "TermOrder": {"name": "TermOrder", "group": "Ungrouped variables", "definition": "(([x,y,random(0..2 except [x,y])] for: y of: [random(0..2 except x)]) for: x of: [random(0..2)])[0][0]", "description": "", "templateType": "anything", "can_override": false}, "MultiplicationToSimplify": {"name": "MultiplicationToSimplify", "group": "Ungrouped variables", "definition": "\"

$\\\\var{Termchoice[TermOrder[0]]}\\\\times\\\\var{Termchoice[TermOrder[1]]}\\\\times\\\\var{Termchoice[TermOrder[2]]}$

\"", "description": "", "templateType": "long string", "can_override": false}, "Answer": {"name": "Answer", "group": "Ungrouped variables", "definition": "simplify(expression(Termchoice[TermOrder[0]]+\"*\"+Termchoice[TermOrder[1]]+\"*\"+Termchoice[TermOrder[2]]),\"all\")", "description": "", "templateType": "anything", "can_override": false}, "IsLetterTwice": {"name": "IsLetterTwice", "group": "Ungrouped variables", "definition": "TermChoice[0]=Coefficient1+Letter1 && TermChoice[1]=Coefficient2+Letter1", "description": "", "templateType": "anything", "can_override": false}, "IsNumberTwice": {"name": "IsNumberTwice", "group": "Ungrouped variables", "definition": "TermChoice[1]=string(Number1)", "description": "", "templateType": "anything", "can_override": false}, "AdviceIfLetterTwice": {"name": "AdviceIfLetterTwice", "group": "Ungrouped variables", "definition": "\"

Since we have two variables that are the same we can simplify by multiplying them together to get $\\\\var{Letter1}^2$. This gives us a final answer of \\\\[\\\\var{Answer}.\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "AdviceIfNumberTwice": {"name": "AdviceIfNumberTwice", "group": "Ungrouped variables", "definition": "\"

Since we only have one variable we just multiply this by the coefficient we have already worked out to get a final answer of \\\\[\\\\var{Answer}.\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "Advice": {"name": "Advice", "group": "Ungrouped variables", "definition": "if(IsLetterTwice, AdviceIfLetterTwice, if(IsNumberTwice, AdviceIfNumberTwice, AdviceOtherwise))", "description": "", "templateType": "anything", "can_override": false}, "Coefficient1": {"name": "Coefficient1", "group": "Ungrouped variables", "definition": "string(random(2..8))", "description": "", "templateType": "anything", "can_override": false}, "Coefficient2": {"name": "Coefficient2", "group": "Ungrouped variables", "definition": "string(random(2..5))", "description": "", "templateType": "anything", "can_override": false}, "NumbersToMultiply": {"name": "NumbersToMultiply", "group": "Ungrouped variables", "definition": "if(IsNumberTwice, [int(dec(Coefficient1)),Number1,Number2], if(IsLetterTwice, [int(dec(Coefficient1)),int(dec(Coefficient2)),Number1], if(IsTwoLettersWithCoeff, [int(dec(Coefficient1)),int(dec(Coefficient2)),int(dec(TermChoice[2]))], [int(dec(Coefficient1)),Number1,1])))", "description": "", "templateType": "anything", "can_override": false}, "AnswerCoefficient": {"name": "AnswerCoefficient", "group": "Ungrouped variables", "definition": "NumbersToMultiply[0]*NumbersToMultiply[1]*NumbersToMultiply[2]", "description": "", "templateType": "anything", "can_override": false}, "IsTwoLettersWithCoeff": {"name": "IsTwoLettersWithCoeff", "group": "Ungrouped variables", "definition": "TermChoice[0]=Coefficient1+Letter1 && TermChoice[1]=Coefficient2+Letter2", "description": "", "templateType": "anything", "can_override": false}, "AdviceOtherwise": {"name": "AdviceOtherwise", "group": "Ungrouped variables", "definition": "\"

Since our two variables are different we can\\'t simplify those any further so we just multiply them by our coefficient to get a final answer of \\\\[\\\\var{Answer}.\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["LetterList", "Letter1", "Letter2", "Number1", "Number2", "Coefficient1", "Coefficient2", "TermChoice", "TermOrder", "MultiplicationToSimplify", "Answer", "IsLetterTwice", "IsNumberTwice", "IsTwoLettersWithCoeff", "AdviceIfLetterTwice", "AdviceIfNumberTwice", "AdviceOtherwise", "Advice", "NumbersToMultiply", "AnswerCoefficient"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{Answer}", "answerSimplification": "!all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "(nonone:$n * $v;x * $v;y `where x<>y `| nonone:$n * $v `| nonone:$n * $v^2)", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Andrew Neate", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21832/"}], "resources": []}]}], "contributors": [{"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Andrew Neate", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21832/"}]}