// Numbas version: finer_feedback_settings {"name": "1.3.1.3 Simplify an expression version 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "1.3.1.3 Simplify an expression version 2", "tags": [], "metadata": {"description": "
Simplify ax^2+bx+cx+d to ax^2 + (b+c)x + d
\nThere are 6 versions of this question.
\nPart of HELM Book 1.3
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Simplify, if possible: $\\var{q3expr}$
\nIf the expression cannot be simplified, just type it into the answer box without changing it.
", "advice": "Collecting like terms, $\\var{q3expr}=\\var{q3ans}$
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vars": {"name": "vars", "group": "Ungrouped variables", "definition": "shuffle(['a','b','c','d','f','g','h','k','m','n','p','q','r','s','t','u','v','w','x','y','z'])", "description": "", "templateType": "anything", "can_override": false}, "q3coeffs": {"name": "q3coeffs", "group": "question3", "definition": "repeat(random(-20..20 except 0),6)", "description": "", "templateType": "anything", "can_override": false}, "q3exprs": {"name": "q3exprs", "group": "question3", "definition": "[expression(q3coeffs[0] + \"*\" + vars[4] + \"+\" + q3coeffs[1] + \"+\" +\n q3coeffs[2] + \"*\" + vars[4] + \"+\" + q3coeffs[3] + \"*\" + vars[2] + \n \"+\" + q3coeffs[4]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + \n q3coeffs[1]+\"*\"+vars[4]+\"+\" + q3coeffs[2]+\"*\"+vars[4]+ \"+\" + q3coeffs[2]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + q3coeffs[1]+\"*\"+vars[4]+\"^2+\"+\n q3coeffs[2]+\"*\" + vars[4] + \"+\" + q3coeffs[3]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + q3coeffs[1]+\"*\"+vars[5]+\"^2+\"+\n q3coeffs[2]+\"*\" + vars[5] + \"+\" + q3coeffs[3] + \"*\" + vars[4]),\nexpression(vars[4]+\"^2+\"+vars[5]+\"*\"+vars[4]+\"+\"+vars[4]+\"*\"+vars[5]+\"+\"+\n vars[5]+\"^2\"),\nexpression(vars[4]+\"^3+\"+q3coeffs[0]+\"*\"+vars[4]+\"^2+\"+\n q3coeffs[1]+\"*\"+vars[4]+\"^2+\"+q3coeffs[2]+\"*\"+vars[4]+\"+\"+\n q3coeffs[3]+\"*\"+vars[4]+\"+\"+q3coeffs[4] )\n]", "description": "(0) ax+b+cx+dy+e -> (a+c)x + dy + b+e,
\n(1) ax^2+bx+cx+d -> ax^2 + (b+c)x + d,
\n(2) ax^2+bx^2+cx+d -> (a+b)x^2 + cx + d,
\n(3) ax^2+by^2+cy+dx -> no change
\n(4) x^2+yx+xy+y^2 -> x^2 + 2xy + y^2
\n(5) x^3+ax^2+bx^2+cx+dx+e -> x^3 + (a+b)x^2 + (c+d)x + e
", "templateType": "anything", "can_override": false}, "q3idx": {"name": "q3idx", "group": "question3", "definition": "1", "description": "", "templateType": "anything", "can_override": false}, "q3expr": {"name": "q3expr", "group": "question3", "definition": "simplify(q3exprs[q3idx],[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q3ans": {"name": "q3ans", "group": "question3", "definition": "simplify(q3expr,[\"all\"])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vars"], "variable_groups": [{"name": "question3", "variables": ["q3coeffs", "q3exprs", "q3idx", "q3expr", "q3ans"]}], "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": "{q3ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "`+-$n`?*$v^2 + (`+-$n`?*$v)`? + `+-$n \n`| -$v^2*$n`? + ($v*`+-$n`?)`? + `+-$n\n`| -$v^2*$n`? -$v*$n`? + `+-$n \n`| $v^2*`+-$n`? + (-$v*$n`?)`? + `+-$n \n\n//ax^2+bx+cx+d -> ax^2 + (b+c)x + d", "partialCredit": 0, "message": "You need to collect all like terms.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}