// Numbas version: exam_results_page_options {"name": "1.3.4.1 Factorise an expression", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "1.3.4.1 Factorise an expression", "tags": [], "metadata": {"description": "

Factorise a 2-term expression by pulling out a numeric gcd. Part of HELM Book 1.3

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

Practise these questions repeatedly until you can quickly, confidently and correctly factorise the expressions.

\n

The questions will change each time you click the \"Try another question like this one\" button.

\n

To enter $3ab(7+4b^2)$, type 3a*b*(7+4b^2)

", "advice": "

$\\var{q1c[2]*q1c[0]}$ and $\\var{q1c[2]*q1c[1]}$ have a common factor of $\\var{q1gcd}$, so

\n

$\\var{q1expr}=\\var{q1ans}$

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"q1expr": {"name": "q1expr", "group": "question 1", "definition": "simplify(expression(q1c[2]*q1c[0] + q1v[0] + \"+\" + q1c[2]*q1c[1] + q1v[1]),[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q1ans": {"name": "q1ans", "group": "question 1", "definition": "simplify(expression(\n q1gcd + \"*\" + \"(\" + q1c[0]*q1c[2]/q1gcd + q1v[0] + \"+\" + q1c[1]*q1c[2]/q1gcd + q1v[1] + \")\" ),[\"basic\",\"unitFactor\"])", "description": "", "templateType": "anything", "can_override": false}, "alphabet": {"name": "alphabet", "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}, "q1c": {"name": "q1c", "group": "question 1", "definition": "[random(-9..9 except 0), random(-9..9 except 0), random(2..5)]", "description": "", "templateType": "anything", "can_override": false}, "q1v": {"name": "q1v", "group": "question 1", "definition": "alphabet[0..2]", "description": "", "templateType": "anything", "can_override": false}, "q1gcd": {"name": "q1gcd", "group": "question 1", "definition": "if( (q1c[0] < 0 & q1c[1] < 0),\n-1*gcd(q1c[0],q1c[1])*q1c[2],\ngcd(q1c[0],q1c[1])*q1c[2]\n)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["alphabet"], "variable_groups": [{"name": "question 1", "variables": ["q1expr", "q1ans", "q1c", "q1v", "q1gcd"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": true, "customName": "Exercise 1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Factorise $\\var{q1expr}$. Check your answer by removing the brackets again.

", "answer": "{q1ans}", "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": "// a number times...\n`+-$n`? * \n(\n // either a number 'a' times x,\n // or x on its own, and 'a' is implicitly 1\n ($n;a * $v `| $v;a:1) \n \n + `+-\n \n // either a number 'b' times x,\n // or x on its own, and 'b' is implicitly 1\n ($n;b * $v `| $v;b:1)\n)\n\n// a and b must be coprime\n`where (gcd(a,b)=1)", "partialCredit": 0, "message": "You have not fully factorised the expression.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "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/"}]}