// Numbas version: exam_results_page_options {"name": "HELM Book 1.3.4 exercises", "metadata": {"description": "

HELM Book 1.3.4 exercises

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", ""], "variable_overrides": [[], [], []], "questions": [{"name": "1.3.4.1 Factorise an expression", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "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": {}, "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"}, {"name": "1.3.4.2 Factorise an expression", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Factorise a 2-term expression where the gcd can be alphanumeric. 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.

", "advice": "

$\\var{simplify(expression(q2terms[q2termidx]),\"all\")}$ and $\\var{simplify(expression(q2terms[mod(q2termidx+1,2)]),\"all\")}$ have a common factor of $\\var{fullgcd}$

\n

so $\\var{q2expr}=\\var{q2ans}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"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}, "q2expr": {"name": "q2expr", "group": "question 2", "definition": "simplify(expression(\n string(simplify(expression(q2terms[q2termidx]),[\"all\"]) )\n + \"+\" + \n string(simplify(expression(q2terms[mod(q2termidx+1,2)]),[\"all\"]))\n),\"basic\")", "description": "

In these expressions, the common factor consists of one number and one variable.

", "templateType": "anything", "can_override": false}, "q2c": {"name": "q2c", "group": "question 2", "definition": "[random(-9..9 except 0), random(-9..9 except 0), random(2..9)]", "description": "", "templateType": "anything", "can_override": false}, "q2v": {"name": "q2v", "group": "question 2", "definition": "flatten([\n alphabet[10..13],\n [weighted_random([ [random(alphabet),0.5] , \n [random(alphabet[10..11]),0.5]\n ])\n ]\n])", "description": "", "templateType": "anything", "can_override": false}, "q2coeffs": {"name": "q2coeffs", "group": "question 2", "definition": "[q2c[0]*q2c[2],q2c[1]*q2c[2]]", "description": "", "templateType": "anything", "can_override": false}, "q2terms": {"name": "q2terms", "group": "question 2", "definition": "[\n[q2coeffs[0] +\"*\"+ q2v[0],\n q2coeffs[1] +\"*\"+ q2v[0] + \"*\" + q2v[1]],\n[q2coeffs[0] +\"*\"+ q2v[0] + \"*\" + q2v[3],\n q2coeffs[1] +\"*\"+ q2v[0] + \"*\" + q2v[1]],\n[q2coeffs[0] +\"*\"+q2v[0]+\"*\"+q2v[2],\n q2coeffs[1]+\"*\"+q2v[0]+\"*\"+q2v[1]+\"*\"+q2v[3] ],\n[q2coeffs[0] +\"*\"+q2v[0]+\"*\"+q2v[2],\n q2coeffs[1]+\"*\"+q2v[0]+\"*\"+q2v[3]+\"*\"+q2v[2] ],\n[q2coeffs[0] +\"*\"+q2v[0],\n q2coeffs[1]+\"*\"+q2v[1]+\"*\"+q2v[2]]\n][q2idx]", "description": "

The two terms are randomly ordered, but can look like one of four cases:

\n

* m.a + n.a.b

\n

* m.a.b + n.a.c or m.a^2 + n.a.c

\n

* m.a.b + n.a.c.d or m.a.b + n.a^2.c

\n

* m.a.b + n.a.b.c or m.a.b + n.a^2.c

\n

* m.a + n.b.c

\n

Here m and n are numbers, and a,b,c are variables

", "templateType": "anything", "can_override": false}, "q2gcd": {"name": "q2gcd", "group": "question 2", "definition": "if( (q2c[0] < 0 & q2c[1] < 0),\n-1*gcd(q2c[0],q2c[1])*q2c[2],\ngcd(q2c[0],q2c[1])*q2c[2]\n)", "description": "", "templateType": "anything", "can_override": false}, "q2idx": {"name": "q2idx", "group": "question 2", "definition": "random(0..4)", "description": "", "templateType": "anything", "can_override": false}, "q2termidx": {"name": "q2termidx", "group": "question 2", "definition": "random(0..1)", "description": "

This chooses the order in which the terms are written.

", "templateType": "anything", "can_override": false}, "q2fterms": {"name": "q2fterms", "group": "question 2", "definition": "[\n [string(q2coeffs[0]/q2gcd),\n q2coeffs[1]/q2gcd+ \"*\" + q2v[1] ],\n [q2coeffs[0]/q2gcd+ \"*\" + q2v[3],\n q2coeffs[1]/q2gcd+ \"*\" + q2v[1] ],\n [q2coeffs[0]/q2gcd+\"*\"+q2v[2],\n q2coeffs[1]/q2gcd+\"*\"+q2v[1]+\"*\"+q2v[3] ],\n [string(q2coeffs[0]/q2gcd),\n q2coeffs[1]/q2gcd+\"*\"+q2v[3] ],\n [string(q2coeffs[0]/q2gcd)+\"*\"+q2v[0],\n q2coeffs[1]/q2gcd+ \"*\" + q2v[1] + \"*\" + q2v[2] ]\n ][q2idx]", "description": "

Terms with the common factors removed.

", "templateType": "anything", "can_override": false}, "q2ans": {"name": "q2ans", "group": "question 2", "definition": "expression(\nq2gcd + \n [\"*\" +q2v[0] , \"*\" +q2v[0], \"*\" +q2v[0], \"*\" +q2v[0] + \"*\" + q2v[2], \"\" ][q2idx]\n + \"*(\" +\n string(simplify(expression(\n string(simplify(expression(q2fterms[q2termidx]),[\"all\"]) )\n + \"+\" + \n string(simplify(expression(q2fterms[mod(q2termidx+1,2)]),[\"all\"]))\n ),\"basic\"))\n +\")\"\n)", "description": "", "templateType": "anything", "can_override": false}, "fullgcd": {"name": "fullgcd", "group": "question 2", "definition": "expression(\n if( tempgcd[length(tempgcd)-1]=\"*\", \n tempgcd[0..length(tempgcd)-1],\n tempgcd\n )\n)", "description": "", "templateType": "anything", "can_override": false}, "tempgcd": {"name": "tempgcd", "group": "question 2", "definition": "split(string(q2ans),\"(\" )[0]", "description": "

A helping variable used to extract the alphanumeric gcd from q2ans.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["alphabet"], "variable_groups": [{"name": "question 2", "variables": ["q2c", "q2v", "q2coeffs", "q2terms", "q2fterms", "q2gcd", "q2idx", "q2termidx", "q2expr", "q2ans", "tempgcd", "fullgcd"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": true, "customName": "Exercise 2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

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

", "answer": "{q2ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "// start with a number and possibly some variables\n`+- $n`? * $v`* * (\n// add 2 terms in brackets\n`+-($n;a;v1:1;v2:2 `| $n;a * $v;v1;v2:2 ^2`? \n `| $n;a * $v;v1 * $v;v2 `| $v;v1;a:1;v2:2 ^2`? \n `| ($v;v1 * $v;v2);a:1) +\n`+-($n;b;v3:3;v4:4 `| $n;b * $v;v3;v4:4 ^2`? \n `| $n;b * $v;v3 * $v;v4 `| $v;v3;b:1;v4:4 ^2`? \n `| ($v;v3 * $v;v4);b:1))\n// where the gcd inside the brackets = 1\n`where (gcd(a,b)=1)\n// and there are no common variables between the two terms.\n`where distinct([string(v1),string(v2),string(v3),string(v4)])=[string(v1),string(v2),string(v3),string(v4)]", "partialCredit": 0, "message": "You have not fully factorised this expression.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.3.4.3 Identify factors and factorise an expression", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Explain why one variable is a factor but the other is not. Factorise the expression, whose factor is alphanumeric. 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.

", "advice": "

$\\var{v1e}$ is a factor of every term of $\\var{q3expr}$ but $\\var{v2e}$ does not appear in every term.

\n

Hence $\\var{v1e}$ is a factor of $\\var{q3expr}$ but $\\var{v2e}$ is not.

\n

The greatest divisor appearing in every term is $\\var{fullgcd}$.

\n

So $\\var{q3expr}=\\var{q3ans}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"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}, "q3expr": {"name": "q3expr", "group": "question 3", "definition": "simplify(expression([\n string(simplify(expression(q3c1+\"*\"+q3v1+\"+\"+q3c2+\"*\"+q3v1+\"*\"+q3v2),\"all\")),\n string(simplify(expression(q3c1+\"*\"+q3v1+\"^2+\"+q3c2+\"*\"+q3v2+\"*\"+q3v1+\n \"^3+\"+q3c3+\"*\"+q3v2+\"*\"+q3v1+\"^4\"),\"all\"))\n ][q3idx]),\"basic\")", "description": "", "templateType": "anything", "can_override": false}, "q3v1,q3v2": {"name": "q3v1,q3v2", "group": "Ungrouped variables", "definition": "alphabet[14..16]", "description": "", "templateType": "anything", "can_override": false}, "q3ans": {"name": "q3ans", "group": "question 3", "definition": "simplify(expression([\n q3gcd1+\"*\"+q3v1+\"*(\"+q3c1/q3gcd1+\"+\"+q3c2/q3gcd1+\"*\"+q3v2+\")\" ,\n q3gcd2+\"*\"+q3v1+\"^2*(\"+q3c1/q3gcd2+\"+\"+\n q3c2/q3gcd2+\"*\"+q3v2+\"*\"+q3v1+\"+\"+\n q3c3/q3gcd2+\"*\"+q3v2+\"*\"+q3v1+\"^2)\"\n ][q3idx]),\"all\")", "description": "", "templateType": "anything", "can_override": false}, "q3idx": {"name": "q3idx", "group": "question 3", "definition": "random(0..1)", "description": "

0 is a linear factor

\n

1 is a square factor

", "templateType": "anything", "can_override": false}, "q3c1,q3c2,q3c3": {"name": "q3c1,q3c2,q3c3", "group": "Ungrouped variables", "definition": "repeat(random(-9..9 except 0),3)", "description": "", "templateType": "anything", "can_override": false}, "q3gcd1": {"name": "q3gcd1", "group": "question 3", "definition": "gcd(q3c1,q3c2)", "description": "", "templateType": "anything", "can_override": false}, "q3gcd2": {"name": "q3gcd2", "group": "question 3", "definition": "gcd(q3gcd1,q3c3)", "description": "", "templateType": "anything", "can_override": false}, "tempgcd": {"name": "tempgcd", "group": "question 3", "definition": "split(string(q3ans),\"(\")[0]", "description": "

used to get the full alphanumeric gcd out of q3ans

", "templateType": "anything", "can_override": false}, "fullgcd": {"name": "fullgcd", "group": "question 3", "definition": "expression(\n if( tempgcd[length(tempgcd)-1]=\"*\", \n tempgcd[0..length(tempgcd)-1],\n tempgcd\n )\n)", "description": "

used in the advice

", "templateType": "anything", "can_override": false}, "v1e": {"name": "v1e", "group": "Ungrouped variables", "definition": "expression(q3v1)", "description": "

used for display in the advice

", "templateType": "anything", "can_override": false}, "v2e": {"name": "v2e", "group": "Ungrouped variables", "definition": "expression(q3v2)", "description": "

used for display in the advice

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["q3v1,q3v2", "q3c1,q3c2,q3c3", "alphabet", "v1e", "v2e"], "variable_groups": [{"name": "question 3", "variables": ["q3idx", "q3gcd1", "q3gcd2", "q3expr", "q3ans", "tempgcd", "fullgcd"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": true, "customName": "Exercise 3", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Explain why $\\var{v1e}$ is a factor of $\\var{q3expr}$ but $\\var{v2e}$ is not.

\n

Factorise $\\var{q3expr}$.

", "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": "//gcd and common variable,v, outside brackets\n(`+-$n`?*$v^2`? `| -$v^2 )*(\n// terms inside must be either n+v or n+nvw+nxv^2, \n// where n is a number that may be implicit.\n (`+-$n;a + `+- $n;b;c:-1*$v`* `|\n `+-$n;a + `+- $v;b:1;c:-1 `|\n `+-$n;a + `+- $n;b*$v;v1*$v;v2 + `+- $n;c*$v*$v^2 `|\n `+-$n;a + `+- $v;v1;b:1*$v;v2 + `+- $n;c*$v*$v^2 `|\n `+-$n;a + `+- $n;b*$v;v1*$v;v2 + `+- $v;v1*$v;v2;c:1^2 `|\n `+-$n;a + `+- $v;v1;b:1*$v;v2 + `+- $v;v1*$v;v2;c:1^2\n )\n )\n// numbers within brackets must be coprime.\n`where (if(c=-1,gcd(a,b)=1,gcd(gcd(a,b),c)=1))", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "menu", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": "", "allowAttemptDownload": false, "downloadEncryptionKey": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "

Work through these practice questions. You are encouraged to try each question multiple times as the expressions in each question will change each time you try it. 

", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "extensions": [], "custom_part_types": [], "resources": []}