// Numbas version: finer_feedback_settings {"name": "2024/25 Test 1 ", "metadata": {"description": "", "licence": "None specified"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []], "questions": [{"name": "Ahmed's copy of HCF", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "

This question tests the student's ability to identify the factors of some composite numbers and the highest common factors of two numbers. 

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "

\n

We now look for common factors between the two lists of factors, and the highest common factor will be the largest of these.

\n

\n

For $\\var{fourfac}$ and $\\var{sixfac}$, the highest common factor is $\\var{hc}$.

\n

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"fourfac": {"name": "fourfac", "group": "Ungrouped variables", "definition": "random(27,33,39)", "description": "", "templateType": "anything", "can_override": false}, "hc": {"name": "hc", "group": "Ungrouped variables", "definition": "gcd(sixfac,fourfac)", "description": "", "templateType": "anything", "can_override": false}, "sixfac": {"name": "sixfac", "group": "Ungrouped variables", "definition": "random(12,18)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["sixfac", "fourfac", "hc"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": "fraction {\n display: inline-block;\n vertical-align: middle;\n}\nfraction > numerator, fraction > denominator {\n float: left;\n width: 100%;\n text-align: center;\n line-height: 2.5em;\n}\nfraction > numerator {\n border-bottom: 1px solid;\n padding-bottom: 5px;\n}\nfraction > denominator {\n padding-top: 5px;\n}\nfraction input {\n line-height: 1em;\n}\n\nfraction .part {\n margin: 0;\n}\n\n.table-responsive, .fractiontable {\n display:inline-block;\n}\n.fractiontable {\n padding: 0; \n border: 0;\n}\n\n.fractiontable .tddenom \n{\n text-align: center;\n}\n\n.fractiontable .tdnum \n{\n border-bottom: 1px solid black; \n text-align: center;\n}\n\n\n.fractiontable tr {\n height: 3em;\n}\n"}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the highest common factor of $\\var{fourfac}$ and $\\var{sixfac}$?

\n

The highest common factor is [[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "6", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "hc", "maxValue": "hc", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "LCM", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "

This is a simple question testing the student on their ability to calculate the lowest common multiple of two integers which are: 

\n

Part a) - coprime;

\n

Part b) - where the greatest common divisor between the two integers is greater than one and not equal to either given number; and

\n

Part c) - where one of the integer is a multiple of the other. 

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "

\n

\n

The lowest common multiple of $\\var{f}$ and $\\var{g}$ will be the product of the two numbers, divided by the greatest common divisor.

\n

The greatest common divisor of $\\var{f}$ and $\\var{g}$ is $\\var{gcd_fg}$.

\n

Therefore, the lowest common multiple will is

\n

\\[\\frac{\\var{f}\\times\\var{g}}{\\var{gcd_fg}}=\\var{lcm_fg}\\text{.}\\]

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "part c", "definition": "random([2,3,5,7,11,13])", "description": "", "templateType": "anything", "can_override": false}, "lcm_fg": {"name": "lcm_fg", "group": "part b", "definition": "lcm(f,g)", "description": "", "templateType": "anything", "can_override": false}, "lcm_ab": {"name": "lcm_ab", "group": "part c", "definition": "lcm(a,b)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "part a", "definition": "random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "lcm_cd": {"name": "lcm_cd", "group": "part a", "definition": "lcm(c,d)", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "part b", "definition": "random([10,12,14,16,18,22,27] except f)", "description": "", "templateType": "anything", "can_override": false}, "gcd_fg": {"name": "gcd_fg", "group": "part b", "definition": "gcd(f,g)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "part c", "definition": "random([2,3,5,7,11,13] except a)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "part b", "definition": "random([10,12,14,16,18,22])", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "part a", "definition": "random(2..6)*c", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "part c", "variables": ["a", "b", "lcm_ab"]}, {"name": "part a", "variables": ["c", "d", "lcm_cd"]}, {"name": "part b", "variables": ["f", "g", "lcm_fg", "gcd_fg"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "6", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the lowest common multiple of $\\var{f}$ and $\\var{g}$?

", "minValue": "lcm_fg", "maxValue": "lcm_fg", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "BIDMAS", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Hollie Tarr", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1176/"}, {"name": "Christopher Tedd", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1880/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Billy Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3527/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "

Tags: arithmetic, order of operations

Last updated Sep 2019

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Calculate the following expression using BIDMAS.

", "advice": "

\n

Remember to calculate operations in the correct order: Brackets first, Division and Multiplication next, and Addition and Subtraction last.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"OperatorsC": {"name": "OperatorsC", "group": "Part c", "definition": "[(div2C-mod2C)/4,mod2C,mod1C]", "description": "

Obtains the nth base-4 digit of RandomC

", "templateType": "anything", "can_override": false}, "OperatorsA": {"name": "OperatorsA", "group": "Part A", "definition": "[random(0,2),random(1,3)]", "description": "", "templateType": "anything", "can_override": false}, "div2D": {"name": "div2D", "group": "Part d", "definition": "(RandomD-mod1D)/4", "description": "", "templateType": "anything", "can_override": false}, "ExpressionB": {"name": "ExpressionB", "group": "Part A", "definition": "latex(\"(\"+aa+DispOperators[OperatorsA[0]]+ab+\")\"+DispOperators[OperatorsA[1]]+ac)", "description": "", "templateType": "anything", "can_override": false}, "div2E": {"name": "div2E", "group": "Part e", "definition": "(RandomE-mod1E)/4", "description": "", "templateType": "anything", "can_override": false}, "ac": {"name": "ac", "group": "Part A", "definition": "if(OperatorsA[1]=3,random(2..5),random(2..10))", "description": "", "templateType": "anything", "can_override": false}, "ea": {"name": "ea", "group": "Part e", "definition": "random(2..7)", "description": "", "templateType": "anything", "can_override": false}, "aa": {"name": "aa", "group": "Part A", "definition": "if(OperatorsA[1]=3,ac+random(-1,1)*random([ac,2*ac,3*ac,4*ac]),random(1..10))", "description": "", "templateType": "anything", "can_override": false}, "div2C": {"name": "div2C", "group": "Part c", "definition": "(RandomC-mod1C)/4", "description": "", "templateType": "anything", "can_override": false}, "ed": {"name": "ed", "group": "Part e", "definition": "random(2..7)", "description": "", "templateType": "anything", "can_override": false}, "ExpressionD": {"name": "ExpressionD", "group": "Part d", "definition": "latex(if(BracketsD=0 or BracketsD=2,\"(\"+da+DispOperators[OperatorsD[0]]+db+\")\",da+DispOperators[OperatorsD[0]]+db)+DispOperators[OperatorsD[1]]+if(BracketsD=1 or BracketsD=2,\"(\"+dc+DispOperators[OperatorsD[2]]+dd+\")\",dc+DispOperators[OperatorsD[2]]+dd))", "description": "", "templateType": "anything", "can_override": false}, "da": {"name": "da", "group": "Part d", "definition": "random(2..7)", "description": "", "templateType": "anything", "can_override": false}, "mod1E": {"name": "mod1E", "group": "Part e", "definition": "mod(RandomE,4)", "description": "", "templateType": "anything", "can_override": false}, "BracketsE": {"name": "BracketsE", "group": "Part e", "definition": "random(0..2)", "description": "", "templateType": "anything", "can_override": false}, "Calcdcdd": {"name": "Calcdcdd", "group": "Part d", "definition": "eval(expression(\"(\"+dc+CalcOperators[OperatorsD[2]]+dd+\")\"))", "description": "", "templateType": "anything", "can_override": false}, "eb": {"name": "eb", "group": "Part e", "definition": "if(OperatorsE[1]=3,if(BracketsE=1,random([2*Calceced,3*Calceced,4*Calceced]),if(BracketsE=0,CorrectionE+random([ec,2*ec,3*ec]),CorrectionE+random([Calceced,2*Calceced,3*Calceced]))),random(2..7))", "description": "", "templateType": "anything", "can_override": false}, "dd": {"name": "dd", "group": "Part d", "definition": "random(2..7)", "description": "", "templateType": "anything", "can_override": false}, "cb": {"name": "cb", "group": "Part c", "definition": "if(OperatorsC[0]=3,random(2..5),if(OperatorsC[1]=3,random([2*cc,3*cc,4*cc]),random(2..12)))", "description": "", "templateType": "anything", "can_override": false}, "RandomE": {"name": "RandomE", "group": "Part e", "definition": "random(11,14,23,27,29,30,35,38,39,44,45,46)", "description": "

Generates the random array OperatorsE, ensuring OperatorsE[0]+OperatorsE[1]+OperatorsE[2]>4 and avoiding the excluded possibilities [n,2,2], [n,3,3] and [2,2,n]

", "templateType": "anything", "can_override": false}, "db": {"name": "db", "group": "Part d", "definition": "if(OperatorsD[1]=3,if(BracketsD=1,random([2*Calcdcdd,3*Calcdcdd,4*Calcdcdd]),if(BracketsD=0,CorrectionD+random([dc,2*dc,3*dc]),CorrectionD+random([Calcdcdd,2*Calcdcdd,3*Calcdcdd]))),random(2..7))", "description": "

Straightforward UNLESS second (middle) operation is division; in which case care must be taken to ensure an integer solution, dependent on positions of brackets and other two operations

", "templateType": "anything", "can_override": false}, "ca": {"name": "ca", "group": "Part c", "definition": "if(OperatorsC[0]=3,random([2*cb,3*cb,4*cb]),random(2..12))", "description": "", "templateType": "anything", "can_override": false}, "cd": {"name": "cd", "group": "Part c", "definition": "if(OperatorsC[1]=3,random(2..5),random(2..12))", "description": "", "templateType": "anything", "can_override": false}, "mod1D": {"name": "mod1D", "group": "Part d", "definition": "mod(RandomD,4)", "description": "", "templateType": "anything", "can_override": false}, "ab": {"name": "ab", "group": "Part A", "definition": "if(OperatorsA[1]=3,random([2*ac,3*ac,4*ac]),random(1..10 except aa))", "description": "", "templateType": "anything", "can_override": false}, "mod1C": {"name": "mod1C", "group": "Part c", "definition": "mod(RandomC,4)", "description": "", "templateType": "anything", "can_override": false}, "CalcOperators": {"name": "CalcOperators", "group": "Ungrouped variables", "definition": "[ \"+\", \"*\", \"-\", \"/\" ]", "description": "", "templateType": "list of strings", "can_override": false}, "cc": {"name": "cc", "group": "Part c", "definition": "if(OperatorsC[1]=3,random(2..5),if(OperatorsC[2]=3,random([2*cd,3*cd,4*cd]),random(2..12)))", "description": "", "templateType": "anything", "can_override": false}, "DispOperators": {"name": "DispOperators", "group": "Ungrouped variables", "definition": "[ \"+\", \"\\\\times\", \"-\", \"\\\\div\" ]", "description": "", "templateType": "list of strings", "can_override": false}, "SolutionE": {"name": "SolutionE", "group": "Part e", "definition": "eval(expression(if(BracketsE=0 or BracketsE=2,\"(\"+ea+CalcOperators[OperatorsE[0]]+eb+\")\",ea+CalcOperators[OperatorsE[0]]+eb)+CalcOperators[OperatorsE[1]]+if(BracketsE=1 or BracketsE=2,\"(\"+ec+CalcOperators[OperatorsE[2]]+ed+\")\",ec+CalcOperators[OperatorsE[2]]+ed)))", "description": "", "templateType": "anything", "can_override": false}, "ExpressionA": {"name": "ExpressionA", "group": "Part A", "definition": "latex(aa+DispOperators[OperatorsA[0]]+ab+DispOperators[OperatorsA[1]]+ac)", "description": "", "templateType": "anything", "can_override": false}, "BracketsD": {"name": "BracketsD", "group": "Part d", "definition": "random(0..2)", "description": "", "templateType": "anything", "can_override": false}, "RandomC": {"name": "RandomC", "group": "Part c", "definition": "random(11..59 except [15,26,31]+list(40..43)+[47,58])", "description": "

Generates the random array OperatorsC, avoiding the excluded possibilities [n,2,2], [n,3,3], [2,2,n] and [3,3,n]

", "templateType": "anything", "can_override": false}, "OperatorsE": {"name": "OperatorsE", "group": "Part e", "definition": "[(div2E-mod2E)/4,mod2E,mod1E]", "description": "

Obtains the nth base-4 digit of RandomE

", "templateType": "anything", "can_override": false}, "ExpressionE": {"name": "ExpressionE", "group": "Part e", "definition": "latex(if(BracketsE=0 or BracketsE=2,\"(\"+ea+DispOperators[OperatorsE[0]]+eb+\")\",ea+DispOperators[OperatorsE[0]]+eb)+DispOperators[OperatorsE[1]]+if(BracketsE=1 or BracketsE=2,\"(\"+ec+DispOperators[OperatorsE[2]]+ed+\")\",ec+DispOperators[OperatorsE[2]]+ed))", "description": "", "templateType": "anything", "can_override": false}, "Calceced": {"name": "Calceced", "group": "Part e", "definition": "eval(expression(\"(\"+ec+CalcOperators[OperatorsE[2]]+ed+\")\"))", "description": "", "templateType": "anything", "can_override": false}, "SolutionD": {"name": "SolutionD", "group": "Part d", "definition": "eval(expression(if(BracketsD=0 or BracketsD=2,\"(\"+da+CalcOperators[OperatorsD[0]]+db+\")\",da+CalcOperators[OperatorsD[0]]+db)+CalcOperators[OperatorsD[1]]+if(BracketsD=1 or BracketsD=2,\"(\"+dc+CalcOperators[OperatorsD[2]]+dd+\")\",dc+CalcOperators[OperatorsD[2]]+dd)))", "description": "", "templateType": "anything", "can_override": false}, "OperatorsD": {"name": "OperatorsD", "group": "Part d", "definition": "[(div2D-mod2D)/4,mod2D,mod1D]", "description": "

Obtains the nth base-4 digit of RandomD

", "templateType": "anything", "can_override": false}, "CorrectionD": {"name": "CorrectionD", "group": "Part d", "definition": "if(OperatorsD[0]=0,if(BracketsD=0,dc-da,Calcdcdd-da),if(OperatorsD[0]=2,if(BracketsD=0,da-dc,da-Calcdcdd),0))", "description": "

Only used in case BracketsD=0 or BracketsD=2

", "templateType": "anything", "can_override": false}, "SolutionC": {"name": "SolutionC", "group": "Part c", "definition": "eval(expression(ca+CalcOperators[OperatorsC[0]]+cb+CalcOperators[OperatorsC[1]]+cc+CalcOperators[OperatorsC[2]]+cd))", "description": "", "templateType": "anything", "can_override": false}, "ec": {"name": "ec", "group": "Part e", "definition": "if(OperatorsE[2]=3,random([2*ed,3*ed,4*ed]),if(OperatorsE[1]=3 and BracketsE>0 and OperatorsE[2]=2,random(ed-3..ed+3 except ed),random(2..7)))", "description": "", "templateType": "anything", "can_override": false}, "SolutionB": {"name": "SolutionB", "group": "Part A", "definition": "eval(expression(\"(\"+aa+CalcOperators[OperatorsA[0]]+ab+\")\"+CalcOperators[OperatorsA[1]]+ac))", "description": "", "templateType": "anything", "can_override": false}, "SolutionA": {"name": "SolutionA", "group": "Part A", "definition": "eval(expression(aa+CalcOperators[OperatorsA[0]]+ab+CalcOperators[OperatorsA[1]]+ac))", "description": "", "templateType": "anything", "can_override": false}, "mod2D": {"name": "mod2D", "group": "Part d", "definition": "mod(Div2D,4)", "description": "", "templateType": "anything", "can_override": false}, "CorrectionE": {"name": "CorrectionE", "group": "Part e", "definition": "if(OperatorsE[0]=0,if(BracketsE=0,ec-ea,Calceced-ea),if(OperatorsE[0]=2,if(BracketsE=0,ea-ec,ea-Calceced),0))", "description": "", "templateType": "anything", "can_override": false}, "mod2C": {"name": "mod2C", "group": "Part c", "definition": "mod(div2C,4)", "description": "", "templateType": "anything", "can_override": false}, "RandomD": {"name": "RandomD", "group": "Part d", "definition": "random(11..46 except [15,26,31]+list(40..43))", "description": "

Generates the random array OperatorsD, avoiding the excluded possibilities [n,2,2], [n,3,3] and [2,2,n]

", "templateType": "anything", "can_override": false}, "dc": {"name": "dc", "group": "Part d", "definition": "if(OperatorsD[2]=3,random([2*dd,3*dd,4*dd]),if(OperatorsD[1]=3 and BracketsD>1 and OperatorsD[2]=2,random(dd-3..dd+3 except dd),random(2..7)))", "description": "", "templateType": "anything", "can_override": false}, "mod2E": {"name": "mod2E", "group": "Part e", "definition": "mod(div2E,4)", "description": "", "templateType": "anything", "can_override": false}, "ExpressionC": {"name": "ExpressionC", "group": "Part c", "definition": "latex(ca+DispOperators[OperatorsC[0]]+cb+DispOperators[OperatorsC[1]]+cc+DispOperators[OperatorsC[2]]+cd)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "OperatorsC[0]+OperatorsC[1]+OperatorsC[2]>4 and\nOperatorsD[0]+OperatorsD[1]+OperatorsD[2]>3", "maxRuns": 100}, "ungrouped_variables": ["DispOperators", "CalcOperators"], "variable_groups": [{"name": "Part A", "variables": ["ExpressionA", "ExpressionB", "aa", "ab", "ac", "OperatorsA", "SolutionA", "SolutionB"]}, {"name": "Part c", "variables": ["RandomC", "mod1C", "div2C", "mod2C", "OperatorsC", "ExpressionC", "ca", "cb", "cc", "cd", "SolutionC"]}, {"name": "Part d", "variables": ["RandomD", "mod1D", "div2D", "mod2D", "BracketsD", "OperatorsD", "ExpressionD", "Calcdcdd", "CorrectionD", "da", "db", "dc", "dd", "SolutionD"]}, {"name": "Part e", "variables": ["RandomE", "mod1E", "div2E", "mod2E", "BracketsE", "OperatorsE", "ExpressionE", "Calceced", "CorrectionE", "ea", "eb", "ec", "ed", "SolutionE"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\var{ExpressionE}=$[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "SolutionE", "maxValue": "SolutionE", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Adding and subtracting fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "

Manipulate fractions in order to add and subtract them. The difficulty escalates through the inclusion of a whole integer and a decimal, which both need to be converted into a fraction before the addition/subtraction can take place. 

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Calculate the following expression involving addition and subtraction of fractions. Give your answer as a fraction in its simplest form.

", "advice": "

\n

$\\displaystyle\\frac{\\var{f_coprime}}{\\var{g_coprime}}-\\frac{\\var{h_coprime}}{\\var{j_coprime}}+2.$

\n

\n

The two fractions can be individually multiplied to achieve a common denominator of the lowest common multiple, $\\var{lcm2}.$

\n

$\\displaystyle\\frac{\\var{f_coprime}}{\\var{g_coprime}}$ becomes $\\displaystyle\\frac{\\var{flcm2_g}}{\\var{lcm2}}$ and $\\displaystyle\\frac{\\var{h_coprime}}{\\var{j_coprime}}$ becomes $\\displaystyle\\frac{\\var{hlcm2_j}}{\\var{lcm2}}.$

\n

We can now subtract the second fraction from the first.

\n

$\\displaystyle\\frac{\\var{flcm2_g}}{\\var{lcm2}}-\\frac{\\var{hlcm2_j}}{\\var{lcm2}}=\\frac{\\var{flcmhlcm}}{\\var{lcm2}}.$

\n

From this, the question asks us to add $2$. We need to change the mixed number, $2$, into an improper fraction. 

\n

$\\displaystyle2=2\\bigg(\\frac{\\var{lcm2}}{\\var{lcm2}}\\bigg)=\\frac{\\var{twolcm2}}{\\var{lcm2}}.$

\n

We can now continue with the question.

\n

$\\displaystyle\\frac{\\var{flcmhlcm}}{\\var{lcm2}}+\\frac{\\var{twolcm2}}{\\var{lcm2}}=\\frac{\\var{num2unsim}}{\\var{lcm2}}.$

\n

We can look to simplify by dividing by the greatest common divisor of $\\var{num2unsim}$ and $\\var{lcm2}$ which is $\\var{gcd2}.$

\n

Simplifying by this value gives the final answer $\\displaystyle\\simplify{{num2unsim}/{lcm2}}.$

\n

Therefore, no further simplification is possible, and $\\displaystyle\\simplify{{num2unsim}/{lcm2}}$ is the final answer.

\n

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"d_coprime": {"name": "d_coprime", "group": "Part a", "definition": "d/gcd_cd", "description": "", "templateType": "anything", "can_override": false}, "hlcm2_j": {"name": "hlcm2_j", "group": "Part b", "definition": "h_coprime*lcm2_j", "description": "

PART B

", "templateType": "anything", "can_override": false}, "lcm2": {"name": "lcm2", "group": "Part b", "definition": "lcm(g_coprime,j_coprime)", "description": "

PART B

", "templateType": "anything", "can_override": false}, "denom": {"name": "denom", "group": "Part a", "definition": "lcm/gcd", "description": "

PART A answer for the denominator of part a

", "templateType": "anything", "can_override": false}, "term3": {"name": "term3", "group": "Part c", "definition": "gcd3/o_coprime", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Part a", "definition": "random(1..5)", "description": "

PART A variable a - random number between 1 and 5.

", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Part a", "definition": "random(5..15)", "description": "

PART A variable d - random number between 5 and 15.

", "templateType": "anything", "can_override": false}, "gcd_fg": {"name": "gcd_fg", "group": "Part b", "definition": "gcd(f,g)", "description": "

PART B gcd of first fraction num and denom

", "templateType": "anything", "can_override": false}, "j": {"name": "j", "group": "Part b", "definition": "random(2..10 except h)", "description": "

PART B

", "templateType": "anything", "can_override": false}, "gcd_lm": {"name": "gcd_lm", "group": "Part c", "definition": "gcd(l,m)", "description": "", "templateType": "anything", "can_override": false}, "c_coprimeb_coprime": {"name": "c_coprimeb_coprime", "group": "Part a", "definition": "c_coprime*b_coprime", "description": "

PART A variable c times variable b

", "templateType": "anything", "can_override": false}, "l": {"name": "l", "group": "Part c", "definition": "random(1..3)", "description": "", "templateType": "anything", "can_override": false}, "gcd_ab": {"name": "gcd_ab", "group": "Part a", "definition": "gcd(a,b)", "description": "

PART A simplification of fractions in the question.

", "templateType": "anything", "can_override": false}, "k_simp": {"name": "k_simp", "group": "Part c", "definition": "(100k)/(gcd_k100)", "description": "", "templateType": "anything", "can_override": false}, "o_coprime": {"name": "o_coprime", "group": "Part c", "definition": "o/gcd_no", "description": "", "templateType": "anything", "can_override": false}, "n_coprime": {"name": "n_coprime", "group": "Part c", "definition": "n/gcd_no", "description": "", "templateType": "anything", "can_override": false}, "gcd_k100": {"name": "gcd_k100", "group": "Part c", "definition": "gcd(100k,100)", "description": "", "templateType": "anything", "can_override": false}, "lcm_b": {"name": "lcm_b", "group": "Part a", "definition": "lcm/b_coprime", "description": "

PART A lcm of b and d, divided by b

", "templateType": "anything", "can_override": false}, "num": {"name": "num", "group": "Part a", "definition": "alcmclcm/gcd", "description": "

PART A answer for the numerator input

", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Part a", "definition": "random(5..10 except d)", "description": "

PART A variable b - random number between 5 and 10 and not the same value as d.

", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Part b", "definition": "random(1..10)", "description": "

PART B

", "templateType": "anything", "can_override": false}, "gcd_no": {"name": "gcd_no", "group": "Part c", "definition": "gcd(n,o)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Part b", "definition": "random(1..10)", "description": "

PART B

", "templateType": "anything", "can_override": false}, "gcd_numgcd3": {"name": "gcd_numgcd3", "group": "Part c", "definition": "gcd(num1,gcd3)", "description": "", "templateType": "anything", "can_override": false}, "simp": {"name": "simp", "group": "Part c", "definition": "(100)/(gcd_k100)", "description": "", "templateType": "anything", "can_override": false}, "a_coprimed_coprime": {"name": "a_coprimed_coprime", "group": "Part a", "definition": "a_coprime*d_coprime", "description": "

PART A variable a times variable d

", "templateType": "anything", "can_override": false}, "o": {"name": "o", "group": "Part c", "definition": "random(5..15 except m except n except 7 except 11 except 13)", "description": "", "templateType": "anything", "can_override": false}, "lcm_d": {"name": "lcm_d", "group": "Part a", "definition": "lcm/d_coprime", "description": "

PART A lcm of b and d, divided by d

", "templateType": "anything", "can_override": false}, "gcd2": {"name": "gcd2", "group": "Part b", "definition": "gcd(num2unsim,lcm2)", "description": "

PART B

", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Part a", "definition": "random(1..5)", "description": "

PART A variable c - random number between 1 and 5.

", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Part c", "definition": "random(5..12 except 7 except 11)", "description": "", "templateType": "anything", "can_override": false}, "clcm_d": {"name": "clcm_d", "group": "Part a", "definition": "c_coprime*lcm_d", "description": "

PART A variable c times the lcm of b and d, divided by d

", "templateType": "anything", "can_override": false}, "h_coprime": {"name": "h_coprime", "group": "Part b", "definition": "h/gcd_hj", "description": "

PART B

", "templateType": "anything", "can_override": false}, "twolcm2": {"name": "twolcm2", "group": "Part b", "definition": "2*lcm2", "description": "

PART B

", "templateType": "anything", "can_override": false}, "lcm2_j": {"name": "lcm2_j", "group": "Part b", "definition": "lcm2/j_coprime", "description": "

PART B

", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Part c", "definition": "random(0.01..0.9#0.01)", "description": "", "templateType": "anything", "can_override": false}, "gcd": {"name": "gcd", "group": "Part a", "definition": "gcd(alcmclcm,lcm)", "description": "

PART A greatest common divisor of the variables alcmclcm and lcm

", "templateType": "anything", "can_override": false}, "m_coprime": {"name": "m_coprime", "group": "Part c", "definition": "m/gcd(l,m)", "description": "", "templateType": "anything", "can_override": false}, "j_coprime": {"name": "j_coprime", "group": "Part b", "definition": "j/gcd_hj", "description": "

PART B

", "templateType": "anything", "can_override": false}, "flcmhlcm": {"name": "flcmhlcm", "group": "Part b", "definition": "flcm2_g-hlcm2_j", "description": "

PART B

", "templateType": "anything", "can_override": false}, "term1": {"name": "term1", "group": "Part c", "definition": "gcd3/simp", "description": "", "templateType": "anything", "can_override": false}, "alcm_b": {"name": "alcm_b", "group": "Part a", "definition": "a_coprime*lcm_b", "description": "

PART A variable a times the lcm of b and d, divided by b

", "templateType": "anything", "can_override": false}, "a_coprime": {"name": "a_coprime", "group": "Part a", "definition": "a/gcd_ab", "description": "

PART A

", "templateType": "anything", "can_override": false}, "b_coprime": {"name": "b_coprime", "group": "Part a", "definition": "b/gcd_ab", "description": "

PART A 

", "templateType": "anything", "can_override": false}, "g_coprime": {"name": "g_coprime", "group": "Part b", "definition": "g/gcd_fg", "description": "

PART B g_coprime

", "templateType": "anything", "can_override": false}, "gcd_hj": {"name": "gcd_hj", "group": "Part b", "definition": "gcd(h,j)", "description": "

PART B

", "templateType": "anything", "can_override": false}, "gcd1": {"name": "gcd1", "group": "Part c", "definition": "lcm(simp,m_coprime)", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Part b", "definition": "random(2..10 except f except j)", "description": "

PART B

", "templateType": "anything", "can_override": false}, "gcd_cd": {"name": "gcd_cd", "group": "Part a", "definition": "gcd(c,d)", "description": "

PART A 

", "templateType": "anything", "can_override": false}, "lcm": {"name": "lcm", "group": "Part a", "definition": "lcm(b_coprime,d_coprime)", "description": "

PART A lowest common multiple of variable b_coprime and variable d_coprime.

", "templateType": "anything", "can_override": false}, "flcm2_g": {"name": "flcm2_g", "group": "Part b", "definition": "f_coprime*lcm2_g", "description": "

PART B

", "templateType": "anything", "can_override": false}, "lcm2_g": {"name": "lcm2_g", "group": "Part b", "definition": "lcm2/g_coprime", "description": "

PART B

", "templateType": "anything", "can_override": false}, "term2": {"name": "term2", "group": "Part c", "definition": "gcd3/m_coprime", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Part c", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "alcmclcm": {"name": "alcmclcm", "group": "Part a", "definition": "alcm_b+clcm_d", "description": "

PART A 

", "templateType": "anything", "can_override": false}, "gcd3": {"name": "gcd3", "group": "Part c", "definition": "lcm(gcd1,o_coprime)", "description": "", "templateType": "anything", "can_override": false}, "f_coprime": {"name": "f_coprime", "group": "Part b", "definition": "f/gcd_fg", "description": "

PART B

", "templateType": "anything", "can_override": false}, "num1": {"name": "num1", "group": "Part c", "definition": "(k_simp*term1)+(l_coprime*term2)-(n_coprime*term3)", "description": "", "templateType": "anything", "can_override": false}, "c_coprime": {"name": "c_coprime", "group": "Part a", "definition": "c/gcd_cd", "description": "", "templateType": "anything", "can_override": false}, "num2unsim": {"name": "num2unsim", "group": "Part b", "definition": "flcmhlcm+twolcm2", "description": "

PART B

", "templateType": "anything", "can_override": false}, "l_coprime": {"name": "l_coprime", "group": "Part c", "definition": "l/gcd_lm", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Part a", "variables": ["a", "a_coprime", "b", "b_coprime", "gcd_ab", "c", "c_coprime", "d", "d_coprime", "gcd_cd", "lcm", "a_coprimed_coprime", "c_coprimeb_coprime", "lcm_b", "lcm_d", "alcm_b", "clcm_d", "alcmclcm", "gcd", "num", "denom"]}, {"name": "Part b", "variables": ["f", "f_coprime", "g", "g_coprime", "gcd_fg", "h", "h_coprime", "j", "j_coprime", "gcd_hj", "lcm2", "lcm2_g", "flcm2_g", "lcm2_j", "hlcm2_j", "flcmhlcm", "twolcm2", "num2unsim", "gcd2"]}, {"name": "Part c", "variables": ["k", "gcd_k100", "k_simp", "simp", "l", "l_coprime", "m", "m_coprime", "gcd_lm", "n", "n_coprime", "o", "o_coprime", "gcd_no", "gcd1", "gcd3", "term1", "term2", "term3", "num1", "gcd_numgcd3"]}], "functions": {}, "preamble": {"js": "", "css": "fraction {\n display: inline-block;\n vertical-align: middle;\n}\nfraction > numerator, fraction > denominator {\n float: left;\n width: 100%;\n text-align: center;\n line-height: 2.5em;\n}\nfraction > numerator {\n border-bottom: 1px solid;\n padding-bottom: 5px;\n}\nfraction > denominator {\n padding-top: 5px;\n}\nfraction input {\n line-height: 1em;\n}\n\nfraction .part {\n margin: 0;\n}\n\n.table-responsive, .fractiontable {\n display:inline-block;\n}\n.fractiontable {\n padding: 0; \n border: 0;\n}\n\n.fractiontable .tddenom \n{\n text-align: center;\n}\n\n.fractiontable .tdnum \n{\n border-bottom: 1px solid black; \n text-align: center;\n}\n\n\n.fractiontable tr {\n height: 3em;\n}\n"}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\displaystyle\\frac{\\var{f_coprime}}{\\var{g_coprime}}-\\frac{\\var{h_coprime}}{\\var{j_coprime}}+2=$  [[0]] [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "num2unsim/gcd2", "maxValue": "num2unsim/gcd2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "lcm2/gcd2", "maxValue": "lcm2/gcd2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Fraction Division", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "

Several problems involving dividing fractions, with increasingly difficult examples, including mixed numbers and complex fractions. 

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Calculate the following fraction division exercise. Write your answer as a fraction in its simplest form. 

", "advice": "

\n

\\[ \\frac{\\var{f1_coprime}}{\\var{g1_coprime}}\\div\\frac{\\var{h1_coprime}}{\\var{j1_coprime}} \\equiv \\left( \\frac{\\var{f1_coprime}}{\\var{g1_coprime}}\\times\\frac{\\var{j1_coprime}}{\\var{h1_coprime}} \\right)=\\frac{\\var{f1j1}}{\\var{g1h1}} \\]

\n

Then, simplify by finding the highest common divisor in the numerator and denominator which in this case is $\\var{gcd2}$.

\n

This gives a final answer of $\\displaystyle\\simplify{{f1j1}/{g1h1}}$.

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"f4h4": {"name": "f4h4", "group": "part c", "definition": "f4*h4_coprime", "description": "

variable f4 times h4.

\n

Used in part c)

", "templateType": "anything", "can_override": false}, "g4_coprime": {"name": "g4_coprime", "group": "part c", "definition": "g4/gcd(g4,h4)", "description": "

PART C

", "templateType": "anything", "can_override": false}, "h4": {"name": "h4", "group": "part c", "definition": "random(5..8 except g4)", "description": "

Random number but not the same number as variable g4.

\n

Used in part c.

", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "part a", "definition": "random(f..12 except f) ", "description": "

Random number between 2 and 10 and not the same number as variable f.

\n

Used in part a).

", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "part d", "definition": "random(1 .. 10#1)", "description": "

Random number between 1 and 20

\n

Used by part d)

", "templateType": "randrange", "can_override": false}, "bd_c": {"name": "bd_c", "group": "part d", "definition": "(bd-c)", "description": "

Unsimplified denominator for part d).

", "templateType": "anything", "can_override": false}, "h3_coprime": {"name": "h3_coprime", "group": "part c", "definition": "h3/gcd(g3,h3)", "description": "

PART C

", "templateType": "anything", "can_override": false}, "f_coprime": {"name": "f_coprime", "group": "part a", "definition": "f/gcd(f,g)", "description": "

PART A

", "templateType": "anything", "can_override": false}, "g_coprime": {"name": "g_coprime", "group": "part a", "definition": "g/gcd(f,g)", "description": "

PART A

", "templateType": "anything", "can_override": false}, "j1_coprime": {"name": "j1_coprime", "group": "part b", "definition": "j1/gcd(h1,j1)", "description": "

PART B

", "templateType": "anything", "can_override": false}, "gcd2": {"name": "gcd2", "group": "part b", "definition": "gcd(f1j1,g1h1)", "description": "

greatest common divisor of variables f1j1 and g1h1.

\n

Used in part b).

", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "part d", "definition": "random([-7,-5,-3,-2,-1,1,2,3,5,7] except d)", "description": "

Random prime number between -10 and 10.

\n

Used by part d).

", "templateType": "anything", "can_override": false}, "ad_gcd": {"name": "ad_gcd", "group": "part d", "definition": "ad/gcd", "description": "

Correct answer for the numerator in part d)

", "templateType": "anything", "can_override": false}, "g1_coprime": {"name": "g1_coprime", "group": "part b", "definition": "g1/gcd(f1,g1)", "description": "

PART B

", "templateType": "anything", "can_override": false}, "h1_coprime": {"name": "h1_coprime", "group": "part b", "definition": "h1/gcd(h1,j1)", "description": "

PART B

", "templateType": "anything", "can_override": false}, "gcd3": {"name": "gcd3", "group": "part c", "definition": "gcd(num,denom)", "description": "

greatest common denominator for part c. 

", "templateType": "anything", "can_override": false}, "bd": {"name": "bd", "group": "part d", "definition": "b*d", "description": "

Variable b times variable d.

\n

Used in part d)

", "templateType": "anything", "can_override": false}, "j1": {"name": "j1", "group": "part b", "definition": "random(h1..11 except h1)", "description": "

Random number between 2 and 20 and not the same value as variable h1.

\n

Used in part b).

", "templateType": "anything", "can_override": false}, "g1h1": {"name": "g1h1", "group": "part b", "definition": "g1_coprime*h1_coprime", "description": "

variable g1 times h1. 

\n

Used in part b).

", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "part a", "definition": "random(2..10)", "description": "

Random number between 2 and 10.

\n

Used in part a).

", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "part d", "definition": "random(1 .. 10#1)", "description": "

Random number between 1 and 10.

\n

Used by part d)

", "templateType": "randrange", "can_override": false}, "bcd_gcd": {"name": "bcd_gcd", "group": "part d", "definition": "{bd_c}/gcd", "description": "

Correct answer for the denominator in part d).

", "templateType": "anything", "can_override": false}, "f4": {"name": "f4", "group": "part c", "definition": "random(1..3)", "description": "

Random number.

\n

Used in part c).

", "templateType": "anything", "can_override": false}, "f1": {"name": "f1", "group": "part b", "definition": "random(2..10)", "description": "

Random number between 2 and 20.

\n

Used in part b)

", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "part d", "definition": "random(7,11,13,17)", "description": "

Random prime number between 10 and 20.

\n

Used in part d).

", "templateType": "anything", "can_override": false}, "g3": {"name": "g3", "group": "part c", "definition": "random(1..3)", "description": "

Random number.

\n

Used in part c).

", "templateType": "anything", "can_override": false}, "f3h3": {"name": "f3h3", "group": "part c", "definition": "f3*h3_coprime", "description": "

variable f3 times h3.

", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "part a", "definition": "random(2..10)", "description": "

Random number from 2 to 10.

\n

Used in part a).

", "templateType": "anything", "can_override": false}, "gh": {"name": "gh", "group": "part a", "definition": "g_coprime*h_coprime", "description": "

variable g times variable h.

\n

Used in part a).

", "templateType": "anything", "can_override": false}, "j_coprime": {"name": "j_coprime", "group": "part a", "definition": "j/gcd(h,j)", "description": "

PART A

", "templateType": "anything", "can_override": false}, "denom": {"name": "denom", "group": "part c", "definition": "h3_coprime*(f4h4+g4_coprime)", "description": "

Unsimplified denominator of part c.

", "templateType": "anything", "can_override": false}, "j": {"name": "j", "group": "part a", "definition": "random(h..12 except h)", "description": "

Random number between 2 and 10 and not the same value as h.

\n

Used in part a).

", "templateType": "anything", "can_override": false}, "f1j1": {"name": "f1j1", "group": "part b", "definition": "f1_coprime*j1_coprime", "description": "

variable f1 times j1.

\n

Used in part b).

", "templateType": "anything", "can_override": false}, "h4_coprime": {"name": "h4_coprime", "group": "part c", "definition": "h4/gcd(g4,h4)", "description": "

PART C

", "templateType": "anything", "can_override": false}, "g1": {"name": "g1", "group": "part b", "definition": "random(f1..11 except f1) ", "description": "

Random number between 2 and 30 and not the same value as variable f1.

\n

Used in part b).

", "templateType": "anything", "can_override": false}, "fj": {"name": "fj", "group": "part a", "definition": "f_coprime*j_coprime", "description": "

variable f times variable j.

\n

Used in part a).

", "templateType": "anything", "can_override": false}, "gcd": {"name": "gcd", "group": "part d", "definition": "gcd(ad,bd_c)", "description": "

Greatest common divisor of ad and bd_c. 

\n

Used in part d). 

", "templateType": "anything", "can_override": false}, "f3": {"name": "f3", "group": "part c", "definition": "random(1 .. 3#1)", "description": "

Random number between 2 and 6.

\n

Used in part c).

", "templateType": "randrange", "can_override": false}, "f1_coprime": {"name": "f1_coprime", "group": "part b", "definition": "f1/gcd(f1,g1)", "description": "

PART B

", "templateType": "anything", "can_override": false}, "h3": {"name": "h3", "group": "part c", "definition": "random(5..8)", "description": "

Random number and not the same value as variable g3. 

\n

Used in part c).

", "templateType": "anything", "can_override": false}, "gcd1": {"name": "gcd1", "group": "part a", "definition": "gcd(fj,gh)", "description": "

greatest common divisor of variable fj and gh.

\n

Used in part a).

", "templateType": "anything", "can_override": false}, "g3_coprime": {"name": "g3_coprime", "group": "part c", "definition": "g3/gcd(g3,h3)", "description": "

PART C

", "templateType": "anything", "can_override": false}, "h_coprime": {"name": "h_coprime", "group": "part a", "definition": "h/gcd(h,j)", "description": "

PART A

", "templateType": "anything", "can_override": false}, "g4": {"name": "g4", "group": "part c", "definition": "random(1..5)", "description": "

Random number.

\n

Used in part c).

", "templateType": "anything", "can_override": false}, "h1": {"name": "h1", "group": "part b", "definition": "random(2..10)", "description": "

Random number between 2 and 20. 

\n

Used in part b).

", "templateType": "anything", "can_override": false}, "num": {"name": "num", "group": "part c", "definition": "h4_coprime*(f3h3+g3_coprime)", "description": "

numerator of the improper fraction in part c. Unsimplified. 

", "templateType": "anything", "can_override": false}, "ad": {"name": "ad", "group": "part d", "definition": "a*d", "description": "

Variable a times variable d.

\n

Used in part d).

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "part d", "variables": ["a", "b", "c", "d", "bd", "ad", "gcd", "ad_gcd", "bcd_gcd", "bd_c"]}, {"name": "part a", "variables": ["f", "g", "f_coprime", "g_coprime", "h", "j", "h_coprime", "j_coprime", "fj", "gh", "gcd1"]}, {"name": "part b", "variables": ["f1", "g1", "f1_coprime", "g1_coprime", "h1", "j1", "h1_coprime", "j1_coprime", "f1j1", "g1h1", "gcd2"]}, {"name": "part c", "variables": ["f3", "g3", "h3", "g3_coprime", "h3_coprime", "f4", "g4", "h4", "g4_coprime", "h4_coprime", "f3h3", "f4h4", "num", "denom", "gcd3"]}], "functions": {}, "preamble": {"js": "", "css": "fraction {\n display: inline-block;\n vertical-align: middle;\n}\nfraction > numerator, fraction > denominator {\n float: left;\n width: 100%;\n text-align: center;\n line-height: 2.5em;\n}\nfraction > numerator {\n border-bottom: 1px solid;\n padding-bottom: 5px;\n}\nfraction > denominator {\n padding-top: 5px;\n}\nfraction input {\n line-height: 1em;\n}\n\nfraction .part {\n margin: 0;\n}\n\n.table-responsive, .fractiontable {\n display:inline-block;\n}\n.fractiontable {\n padding: 0; \n border: 0;\n}\n\n.fractiontable .tddenom \n{\n text-align: center;\n}\n\n.fractiontable .tdnum \n{\n border-bottom: 1px solid black; \n text-align: center;\n}\n\n\n.fractiontable tr {\n height: 3em;\n}\n"}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\displaystyle\\frac{\\var{f1_coprime}}{\\var{g1_coprime}}\\div\\frac{\\var{h1_coprime}}{\\var{j1_coprime}}=$  [[0]] [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "f1j1/gcd2", "maxValue": "f1j1/gcd2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "g1h1/gcd2", "maxValue": "g1h1/gcd2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Converting Decimals to Fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "

Identify well-known fractional equivalents of decimals. Convert obscure decimals and recurring decimals into fractions.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "

\n

$\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}}.$

\n

To convert a recurring decimal to a fraction, the first step is to set up a simple equation where,

\n

$x=\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}}.$

\n


By multiplying both sides by $100$ to isolate the recurring section on the left hand side of the decimal point, we can gain another simple equation

\n

$100x=\\var{h}\\var{j}\\var{k}.\\dot{\\var{j}}\\dot{\\var{k}}.$

\n

\n

Now that we have two equations in terms of $x$, we can subtract one from the other and solve to get a value of $x$.

\n

\\[
\\begin{align}
&&\\var{h}\\var{j}\\var{k}.\\dot{\\var{j}}\\dot{\\var{k}}&=100x\\\\
-&&\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}}&=x\\\\
&&\\overline{\\qquad} & \\overline{\\qquad} 
\\\\
&&{{\\var{h}}\\var{j}\\var{k-h}}&=99x\\\\
\\\\
&&\\frac{\\var{numerator}}{\\var{g}}&=x\\text{.}\\\\
\\end{align}
\\]

\n

From this, we should look to see if it is possible to simplify by finding the greatest common divisor of the numerator and the denominator. The greatest common divisor is $\\var{gcd1 }.$

\n

Therefore, it is not possible to simplify and so

\n

Simplifying by this value gives the fraction $\\displaystyle\\simplify{{{numerator}}/{g}}$ and so  

\n

\\[
\\begin{align}
\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}}=\\simplify{{{numerator}}/{g}}\\text{ in its fractional form.}\\\\
\\end{align}
\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"answer": {"name": "answer", "group": "Part a", "definition": "round(10c-c)", "description": "", "templateType": "anything", "can_override": false}, "cround": {"name": "cround", "group": "Part a", "definition": "c/3", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Part b", "definition": "99", "description": "", "templateType": "anything", "can_override": false}, "j": {"name": "j", "group": "Part b", "definition": "random(1..9)", "description": "", "templateType": "anything", "can_override": false}, "g_coprime": {"name": "g_coprime", "group": "Part b", "definition": "g/gcd1", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Part a", "definition": "random(0.2,0.4,0.6,0.8)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Part a", "definition": "random(0.1,0.3,0.7,0.9)", "description": "", "templateType": "anything", "can_override": false}, "gcd1": {"name": "gcd1", "group": "Part b", "definition": "gcd(numerator,g)", "description": "", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Part b", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Part a", "definition": "random(0.25,0.75)", "description": "", "templateType": "anything", "can_override": false}, "f4": {"name": "f4", "group": "Part b", "definition": "f1000/gcd(f2,f1000)", "description": "", "templateType": "anything", "can_override": false}, "d_coprime": {"name": "d_coprime", "group": "Part a", "definition": "10d/gcd(10d,10)", "description": "", "templateType": "anything", "can_override": false}, "f1000": {"name": "f1000", "group": "Part b", "definition": "1000", "description": "", "templateType": "anything", "can_override": false}, "numerator_coprime": {"name": "numerator_coprime", "group": "Part b", "definition": "numerator/gcd1", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Part a", "definition": "random(3,6)", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Part b", "definition": "random(h..9 except j except h)", "description": "", "templateType": "anything", "can_override": false}, "f2": {"name": "f2", "group": "Part b", "definition": "precround(f1000*f,0)", "description": "", "templateType": "anything", "can_override": false}, "f3": {"name": "f3", "group": "Part b", "definition": "f2/gcd(f2,f1000)", "description": "", "templateType": "anything", "can_override": false}, "numerator": {"name": "numerator", "group": "Part b", "definition": "h*100+j*10+k - h", "description": "", "templateType": "anything", "can_override": false}, "mygcd": {"name": "mygcd", "group": "Part b", "definition": "gcd(f2,f1000)", "description": "", "templateType": "anything", "can_override": false}, "b_": {"name": "b_", "group": "Part a", "definition": "gcd(100*b,100)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Part b", "definition": "random(0.1..0.8#0.002)", "description": "", "templateType": "anything", "can_override": false}, "b_coprime": {"name": "b_coprime", "group": "Part a", "definition": "100*b/b_", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Part a", "variables": ["a", "b", "c", "d", "b_", "b_coprime", "d_coprime", "answer", "cround"]}, {"name": "Part b", "variables": ["f", "f2", "mygcd", "h", "j", "k", "f3", "f4", "f1000", "numerator", "g", "gcd1", "numerator_coprime", "g_coprime"]}], "functions": {}, "preamble": {"js": "", "css": "fraction {\n display: inline-block;\n vertical-align: middle;\n}\nfraction > numerator, fraction > denominator {\n float: left;\n width: 100%;\n text-align: center;\n line-height: 2.5em;\n}\nfraction > numerator {\n border-bottom: 1px solid;\n padding-bottom: 5px;\n}\nfraction > denominator {\n padding-top: 5px;\n}\nfraction input {\n line-height: 1em;\n}\n\nfraction .part {\n margin: 0;\n}\n\n.table-responsive, .fractiontable {\n display:inline-block;\n}\n.fractiontable {\n padding: 0; \n border: 0;\n}\n\n.fractiontable .tddenom \n{\n text-align: center;\n}\n\n.fractiontable .tdnum \n{\n border-bottom: 1px solid black; \n text-align: center;\n}\n\n\n.fractiontable tr {\n height: 3em;\n}\n"}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Convert this recurring decimal number to a fraction in its simplest form.

\n

$\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}} = $  [[0]] [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "numerator_coprime", "maxValue": "numerator_coprime", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "g_coprime", "maxValue": "g_coprime", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": " Working with standard index form", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "

Convert a variety of numbers from decimal to standard index form.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Write the following numbers in standard form. 

", "advice": "

Converting from decimal to a standard form, we are looking for $A \\times 10^n$.

\n

We need make the first number ($A$) between 1 and 10, so we put the decimal place after the first non-zero digit.

\n

 

\n

In $\\var{A[2]*10^2}$, the first non-zero digit is $\\var{siground(A[2] - 0.5, 1)}$ so we get $A = \\var{A[2]}$.

\n

If we moved the decimal place in $\\var{A[2]}$ so it matches our original number $\\var{A[2]*10^2}$, we would go 2 places to the right, so $n = 2$.

\n

 

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"int": {"name": "int", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "A3dp": {"name": "A3dp", "group": "Ungrouped variables", "definition": "random(1..10 #0.001)", "description": "", "templateType": "anything", "can_override": false}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "repeat(random(3..9 #0.01), 4)", "description": "", "templateType": "anything", "can_override": false}, "small5": {"name": "small5", "group": "Ungrouped variables", "definition": "random(0.00001..0.0001 #0.00000001)", "description": "", "templateType": "anything", "can_override": false}, "A5dp": {"name": "A5dp", "group": "Ungrouped variables", "definition": "random(1..10 #0.00001)", "description": "", "templateType": "anything", "can_override": false}, "ran": {"name": "ran", "group": "Ungrouped variables", "definition": "random([6,7,8,9,10])", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "Ungrouped variables", "definition": "repeat(random(1..10 #0.01 except 10), 3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["A3dp", "A5dp", "small5", "A", "ran", "B", "int"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\var{A[2]*10^2} = $  [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "6", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{A[2]}*10^2", "answerSimplification": "!collectnumbers", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "musthave": {"strings": ["*10^2"], "showStrings": false, "partialCredit": 0, "message": ""}, "notallowed": {"strings": ["^-2", "^(-2)"], "showStrings": false, "partialCredit": 0, "message": ""}, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Rounding numbers to decimal places", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "

Round numbers to a given number of decimal places.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

We can approximate numbers by rounding.

\n

Round $\\var{c1}$ to a given number of decimal places.

", "advice": "

The first thing to do when we are rounding numbers is to identify the last digit we are keeping.

\n

When you're asked to round your answer to a number of decimal places, you need to decide whether to keep the last digit same (rounding down) or increase it by 1 (rounding up). If the following digit is less than 5 we round down and we round up when the next digit is 5 or more.

\n

To write it down in steps:

\n
    \n
      \n
        \n
          \n
        1. Identify the last digit we need to keep.
        2. \n
        3. Look at the following digit.
        4. \n
        5. If it's 5 or more, increase the previous digit by one.
        6. \n
        7. If it's 4 or less, keep the previous digit the same.
        8. \n
        9. Fill any spaces to the right of the digit with zeros if needed.
        10. \n
        \n
      \n
    \n
\n

It is important to keep in mind that if the digit we are increasing is 9, it becomes zero and we increase the previous digit instead. If this digit is 9 as well, we move along to the left side until we find a digit less than 9.

\n
\n

To round a number to a given number $n$ of decimal places, we look at the $n$th digit after the decimal point.

\n

We have $\\var{c1}$.

\n

i)

\n

We look at the first digit after the decimal point. This is $\\var{cdig[4]}$ and the following digit is $\\var{cdig[3]}$ so we round updown to get $\\var{precround(c1, 1)}$.

\n

ii)

\n

The second digit after the decimal point is $\\var{cdig[3]}$. It is followed by $\\var{cdig[2]}$ so we round updown to get $\\var{precround(c1, 2)}$.

\n

iii)

\n

The 3rd decimal place is $\\var{cdig[2]}$, followed by $\\var{cdig[1]}$. We get $\\var{precround(c1, 3)}$. The 4th decimal place is $\\var{cdig[1]}$, followed by $\\var{cdig[0]}$. We get $\\var{precround(c1, 4)}$.

\n

", "rulesets": {}, "variables": {"c1": {"name": "c1", "group": "Ungrouped variables", "definition": "n_from_digits(cdig)*10^(-5) + random(1..5)", "description": "

Random number with 5 decimal places.

", "templateType": "anything"}, "cdig": {"name": "cdig", "group": "Ungrouped variables", "definition": "repeat(random(1..9), 5)", "description": "", "templateType": "anything"}, "dp": {"name": "dp", "group": "Ungrouped variables", "definition": "random(3..4)", "description": "

Number of decimal places to round.

", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": "100"}, "ungrouped_variables": ["dp", "cdig", "c1"], "variable_groups": [], "functions": {"n_from_digits": {"parameters": [["digits", "list"]], "type": "number", "language": "jme", "definition": "if(\n len(digits)=0,\n 0,\n digits[0]+10*n_from_digits(digits[1..len(digits)])\n)"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

i)   $\\var{c1}$ rounded to 1 decimal place is:  [[0]]

\n

ii)   $\\var{c1}$ rounded to 2 decimal places is:  [[1]]

\n

iii)   $\\var{c1}$ rounded to {dp} decimal places is:  [[2]]

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "precround(c1, 1)", "maxValue": "precround(c1, 1)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "precround(c1, 2)", "maxValue": "precround(c1, 2)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "precround(c1, dp)", "maxValue": "precround(c1, dp)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Simplifying surds", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "

This question tests the student's understanding of what is and is not a surd, and on their simplification of surds.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "

\n

\n

This question requires you to notice that $\\sqrt{\\var{a}}$ and $\\sqrt{\\var{d}}$ are squared numbers and can be simplified to integers.

\n

$\\sqrt{\\var{a}}$ = $\\var{sqrta}$ such that:

\n

i) $\\sqrt{\\var{c}}$ = $\\sqrt{\\var{a}}$ x $\\sqrt{\\var{b}}$ = $\\var{sqrta}\\sqrt{\\var{b}}$ and

\n

\n

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "a*b", "description": "

a times b

", "templateType": "anything", "can_override": false}, "doptions": {"name": "doptions", "group": "Ungrouped variables", "definition": "[ 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144 ]", "description": "

List of squared numbers from 1 to 144

", "templateType": "list of numbers", "can_override": false}, "sqrtd": {"name": "sqrtd", "group": "Ungrouped variables", "definition": "sqrt(d)", "description": "

square root of the selected square number d.

", "templateType": "anything", "can_override": false}, "cube": {"name": "cube", "group": "Ungrouped variables", "definition": "Random(8,27,64,125)", "description": "", "templateType": "anything", "can_override": false}, "root": {"name": "root", "group": "Ungrouped variables", "definition": "root(cube,3)", "description": "", "templateType": "anything", "can_override": false}, "sqrta": {"name": "sqrta", "group": "Ungrouped variables", "definition": "sqrt(a)", "description": "

square root of the squared numbers

", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Ungrouped variables", "definition": "random(1..10 except 4 except 9 except 1)", "description": "", "templateType": "anything", "can_override": false}, "j": {"name": "j", "group": "Ungrouped variables", "definition": "random(1..10 except 4 except 9 except h except 1)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..12 except 4 except 9)", "description": "

Random number between 1 and 12 except 4 and 9.

", "templateType": "anything", "can_override": false}, "square": {"name": "square", "group": "Ungrouped variables", "definition": "Random(4,9,16,25,36,49,64,81,100)", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Ungrouped variables", "definition": "d*f", "description": "

d times f

", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(doptions except a)", "description": "

Random squared number but not the same number as a.

", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(2..12 except 4 except 9)", "description": "

Random number between 2 and 12

", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(10..15 except h except j)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(aoptions)", "description": "

Random squared number

", "templateType": "anything", "can_override": false}, "aoptions": {"name": "aoptions", "group": "Ungrouped variables", "definition": "[ 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144 ]", "description": "

List of random square number between 1 and 36

", "templateType": "list of numbers", "can_override": false}}, "variablesTest": {"condition": "c<>b", "maxRuns": 100}, "ungrouped_variables": ["aoptions", "b", "a", "c", "sqrta", "doptions", "sqrtd", "d", "f", "g", "square", "cube", "h", "j", "k", "root"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Simplify the following surd:

\n

$\\displaystyle\\sqrt{\\var{c}}$ = [[0]]$\\displaystyle\\sqrt{\\var{b}}$

\n

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "6", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "sqrta", "maxValue": "sqrta", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Simplify expressions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christopher Tedd", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1880/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Billy Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3527/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

Simplify the following expression, giving your answer using only positive exponents (powers). 

", "advice": "

\n

 $\\simplify{{evar1}^{ea1}{evar2}^{eb1}/{evar3}^{ec1}}\\times\\simplify{({evar2}^{eb2}{evar3}^{ec2})/{evar1}^{ea2}}$

\n

We carry out the multiplication by multiplying top and bottom:

\n

\\[\\frac{\\simplify[unitPower]{{evar1}^{ea1}{evar2}^{eb1}}}{\\simplify[unitPower]{{evar3}^{ec1}}}\\times\\frac{\\simplify[unitPower]{{evar2}^{eb2}{evar3}^{ec2}}}{\\simplify[unitPower]{{evar1}^{ea2}}}=\\frac{\\simplify[unitPower]{{evar1}^{ea1}{evar2}}^{(\\simplify[unitPower]{{eb1}+{eb2}})}\\simplify[unitPower]{{evar3}^{ec2}}}{\\simplify[unitPower]{{evar3}^{ec1}{evar1}^{ea2}}}=\\simplify[unitPower]{{evar1}^{ea1}{evar2}^{eb1+eb2}{evar3}^{ec2}/({evar3}^{ec1}{evar1}^{ea2})}\\text{.}\\]

\n

We finally cancel out common terms from top and bottom:

\n

\\[\\simplify[unitPower]{{evar1}^{ea1}{evar2}^{eb1+eb2}{evar3}^{ec2}/({evar3}^{ec1}{evar1}^{ea2})}=\\frac{\\simplify[]{{evar2}^{eb1+eb2}}}{\\simplify[]{{evar1}}^{(\\simplify[]{{ea2}-{ea1}})}\\simplify[]{{evar3}}^{(\\simplify[]{{ec1}-{ec2}})}}=\\simplify[unitPower]{{evar2}^{eb1+eb2}/({evar1}^{ea2-ea1}{evar3}^{ec1-ec2})}\\text{.}\\]

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"Multiplescd1": {"name": "Multiplescd1", "group": "Part c", "definition": "if(Factorisecd1[0]>0,[2,4,6],[cd1])+if(Factorisecd1[1]>0,[3,6],[cd1])", "description": "", "templateType": "anything", "can_override": false}, "ac": {"name": "ac", "group": "Part a", "definition": "random(-10..10 except [0,-aa/ab])", "description": "", "templateType": "anything", "can_override": false}, "Factorisedd1": {"name": "Factorisedd1", "group": "Part d", "definition": "factorise(dd1)+[0]", "description": "", "templateType": "anything", "can_override": false}, "fb1": {"name": "fb1", "group": "Part f", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "avar2": {"name": "avar2", "group": "Part a", "definition": "expression(av2)", "description": "", "templateType": "anything", "can_override": false}, "dvar2": {"name": "dvar2", "group": "Part d", "definition": "expression(dv2)", "description": "", "templateType": "anything", "can_override": false}, "cid2": {"name": "cid2", "group": "Part c", "definition": "random(1..3)", "description": "", "templateType": "anything", "can_override": false}, "dn1": {"name": "dn1", "group": "Part d", "definition": "random(2..6 except Multiplesdd1)", "description": "", "templateType": "anything", "can_override": false}, "VariablesB": {"name": "VariablesB", "group": "v2", "definition": "random(0..length(Variables)-1 except VariablesA)", "description": "", "templateType": "anything", "can_override": false}, "cin2": {"name": "cin2", "group": "Part c", "definition": "random(2 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "dvar1": {"name": "dvar1", "group": "Part d", "definition": "expression(dv1)", "description": "", "templateType": "anything", "can_override": false}, "fv1": {"name": "fv1", "group": "Part f", "definition": "Variables[VariablesF][0]", "description": "", "templateType": "anything", "can_override": false}, "fd1": {"name": "fd1", "group": "Part f", "definition": "random(2..6)", "description": "", "templateType": "anything", "can_override": false}, "fvar3": {"name": "fvar3", "group": "Part f", "definition": "expression(fv3)", "description": "", "templateType": "anything", "can_override": false}, "VariablesD": {"name": "VariablesD", "group": "Part d", "definition": "random(0..length(variables)-1 except VariablesC)", "description": "", "templateType": "anything", "can_override": false}, "fn1": {"name": "fn1", "group": "Part f", "definition": "random(2..6 except Multiplesfd1)", "description": "", "templateType": "anything", "can_override": false}, "fv2": {"name": "fv2", "group": "Part f", "definition": "Variables[VariablesF][1]", "description": "", "templateType": "anything", "can_override": false}, "Factorisedd2": {"name": "Factorisedd2", "group": "Part d", "definition": "factorise(dd2)+[0]", "description": "", "templateType": "anything", "can_override": false}, "fvar2": {"name": "fvar2", "group": "Part f", "definition": "expression(fv2)", "description": "", "templateType": "anything", "can_override": false}, "Factorisecd2": {"name": "Factorisecd2", "group": "Part c", "definition": "factorise(cd2)+[0]", "description": "", "templateType": "anything", "can_override": false}, "ev3": {"name": "ev3", "group": "Part e", "definition": "Variables[VariablesE][2]", "description": "", "templateType": "anything", "can_override": false}, "av1": {"name": "av1", "group": "Part a", "definition": "Variables[VariablesA][0]", "description": "", "templateType": "anything", "can_override": false}, "din1": {"name": "din1", "group": "Part d", "definition": "random(din2+1..8)", "description": "", "templateType": "anything", "can_override": false}, "fa1": {"name": "fa1", "group": "Part f", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "cn2": {"name": "cn2", "group": "Part c", "definition": "random(1..6 except Multiplescd2)", "description": "", "templateType": "anything", "can_override": false}, "ec2": {"name": "ec2", "group": "Part e", "definition": "random(1 .. 5#1)", "description": "", "templateType": "randrange", "can_override": false}, "dd1": {"name": "dd1", "group": "Part d", "definition": "random(2..6)", "description": "", "templateType": "anything", "can_override": false}, "Multiplescd2": {"name": "Multiplescd2", "group": "Part c", "definition": "if(Factorisecd2[0]>0,[2,4,6],[cd2])+if(Factorisecd2[1]>0,[3,6],[cd2])", "description": "", "templateType": "anything", "can_override": false}, "Factorisefd2": {"name": "Factorisefd2", "group": "Part f", "definition": "factorise(fd2)+[0]", "description": "", "templateType": "anything", "can_override": false}, "fn2": {"name": "fn2", "group": "Part f", "definition": "random(1..6 except Multiplesfd2)", "description": "", "templateType": "anything", "can_override": false}, "ba": {"name": "ba", "group": "v2", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "did2": {"name": "did2", "group": "Part d", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "eb1": {"name": "eb1", "group": "Part e", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "fvar1": {"name": "fvar1", "group": "Part f", "definition": "expression(fv1)", "description": "", "templateType": "anything", "can_override": false}, "Variables": {"name": "Variables", "group": "Ungrouped variables", "definition": "[['x','y','z'],['a','b','c'],['f','g','h'],['r','s','t'],['u','v','w'],['p','q','r']]", "description": "", "templateType": "anything", "can_override": false}, "eb2": {"name": "eb2", "group": "Part e", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "ev1": {"name": "ev1", "group": "Part e", "definition": "Variables[VariablesE][0]", "description": "", "templateType": "anything", "can_override": false}, "Factorisecd1": {"name": "Factorisecd1", "group": "Part c", "definition": "factorise(cd1)+[0]", "description": "", "templateType": "anything", "can_override": false}, "cn1": {"name": "cn1", "group": "Part c", "definition": "random(1..6 except Multiplescd1)", "description": "", "templateType": "anything", "can_override": false}, "evar3": {"name": "evar3", "group": "Part e", "definition": "expression(ev3)", "description": "", "templateType": "anything", "can_override": false}, "dv2": {"name": "dv2", "group": "Part d", "definition": "Variables[VariablesD][1]", "description": "", "templateType": "anything", "can_override": false}, "aa": {"name": "aa", "group": "Part a", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "fb2": {"name": "fb2", "group": "Part f", "definition": "random(fb1+1..2.5*fb1)", "description": "", "templateType": "anything", "can_override": false}, "av2": {"name": "av2", "group": "Part a", "definition": "Variables[VariablesA][1]", "description": "", "templateType": "anything", "can_override": false}, "cvar2": {"name": "cvar2", "group": "Part c", "definition": "expression(cv2)", "description": "", "templateType": "anything", "can_override": false}, "ev2": {"name": "ev2", "group": "Part e", "definition": "Variables[VariablesE][1]", "description": "", "templateType": "anything", "can_override": false}, "cid1": {"name": "cid1", "group": "Part c", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "did1": {"name": "did1", "group": "Part d", "definition": "random(did2+1..(2.5*did2))", "description": "", "templateType": "anything", "can_override": false}, "fd2": {"name": "fd2", "group": "Part f", "definition": "random(2..6)", "description": "", "templateType": "anything", "can_override": false}, "evar2": {"name": "evar2", "group": "Part e", "definition": "expression(ev2)", "description": "", "templateType": "anything", "can_override": false}, "VariablesF": {"name": "VariablesF", "group": "Part f", "definition": "random(0..length(Variables)-1 except VariablesE)", "description": "", "templateType": "anything", "can_override": false}, "ab": {"name": "ab", "group": "Part a", "definition": "random(-10..10 except -1..1)", "description": "", "templateType": "anything", "can_override": false}, "cv2": {"name": "cv2", "group": "Part c", "definition": "Variables[VariablesC][1]", "description": "", "templateType": "anything", "can_override": false}, "VariablesE": {"name": "VariablesE", "group": "Part e", "definition": "random(0..length(Variables)-1 except VariablesD)", "description": "", "templateType": "anything", "can_override": false}, "bc": {"name": "bc", "group": "v2", "definition": "random(-10..10 except [-ba,-1,0,1])", "description": "", "templateType": "anything", "can_override": false}, "evar1": {"name": "evar1", "group": "Part e", "definition": "expression(ev1)", "description": "", "templateType": "anything", "can_override": false}, "bvar2": {"name": "bvar2", "group": "v2", "definition": "expression(bv2)", "description": "", "templateType": "anything", "can_override": false}, "Multiplesdd2": {"name": "Multiplesdd2", "group": "Part d", "definition": "if(Factorisedd2[0]>0,[2,4,6],[dd2])+if(Factorisedd2[1]>0,[3,6],[dd2])", "description": "", "templateType": "anything", "can_override": false}, "cd1": {"name": "cd1", "group": "Part c", "definition": "random(1..6)", "description": "", "templateType": "anything", "can_override": false}, "cin1": {"name": "cin1", "group": "Part c", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "Multiplesfd2": {"name": "Multiplesfd2", "group": "Part f", "definition": "if(Factorisefd2[0]>0,[2,4,6],[fd2])+if(Factorisefd2[1]>0,[3,6],[fd2])", "description": "", "templateType": "anything", "can_override": false}, "Multiplesfd1": {"name": "Multiplesfd1", "group": "Part f", "definition": "if(Factorisefd1[0]>0,[2,4,6],[fd1])+if(Factorisefd1[1]>0,[3,6],[fd1])", "description": "", "templateType": "anything", "can_override": false}, "VariablesA": {"name": "VariablesA", "group": "Part a", "definition": "random(0..length(variables)-1)", "description": "", "templateType": "anything", "can_override": false}, "dd2": {"name": "dd2", "group": "Part d", "definition": "random(2..6)", "description": "", "templateType": "anything", "can_override": false}, "dv1": {"name": "dv1", "group": "Part d", "definition": "Variables[VariablesD][0]", "description": "", "templateType": "anything", "can_override": false}, "dn2": {"name": "dn2", "group": "Part d", "definition": "random(1..6 except Multiplesdd2)", "description": "", "templateType": "anything", "can_override": false}, "Factorisefd1": {"name": "Factorisefd1", "group": "Part f", "definition": "factorise(fd1)+[0]", "description": "", "templateType": "anything", "can_override": false}, "fc1": {"name": "fc1", "group": "Part f", "definition": "random(1 .. 5#1)", "description": "", "templateType": "randrange", "can_override": false}, "fv3": {"name": "fv3", "group": "Part f", "definition": "Variables[VariablesF][2]", "description": "", "templateType": "anything", "can_override": false}, "cd2": {"name": "cd2", "group": "Part c", "definition": "random(1..6)", "description": "", "templateType": "anything", "can_override": false}, "Multiplesdd1": {"name": "Multiplesdd1", "group": "Part d", "definition": "if(Factorisedd1[0]>0,[2,4,6],[dd1])+if(Factorisedd1[1]>0,[3,6],[dd1])", "description": "", "templateType": "anything", "can_override": false}, "VariablesC": {"name": "VariablesC", "group": "Part c", "definition": "random(0..length(variables)-1)", "description": "", "templateType": "anything", "can_override": false}, "bv2": {"name": "bv2", "group": "v2", "definition": "Variables[VariablesB][1]", "description": "", "templateType": "anything", "can_override": false}, "ea1": {"name": "ea1", "group": "Part e", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "fc2": {"name": "fc2", "group": "Part f", "definition": "random(1 .. 5#1)", "description": "", "templateType": "randrange", "can_override": false}, "bv1": {"name": "bv1", "group": "v2", "definition": "Variables[VariablesB][0]", "description": "", "templateType": "anything", "can_override": false}, "cv1": {"name": "cv1", "group": "Part c", "definition": "Variables[VariablesC][0]", "description": "", "templateType": "anything", "can_override": false}, "ec1": {"name": "ec1", "group": "Part e", "definition": "random(ec2+1..2.5*ec2)", "description": "", "templateType": "anything", "can_override": false}, "avar1": {"name": "avar1", "group": "Part a", "definition": "expression(av1)", "description": "", "templateType": "anything", "can_override": false}, "din2": {"name": "din2", "group": "Part d", "definition": "random(1 .. 7#1)", "description": "", "templateType": "randrange", "can_override": false}, "bb": {"name": "bb", "group": "v2", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "bvar1": {"name": "bvar1", "group": "v2", "definition": "expression(bv1)", "description": "", "templateType": "anything", "can_override": false}, "fa2": {"name": "fa2", "group": "Part f", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "ea2": {"name": "ea2", "group": "Part e", "definition": "random(ea1+1..2.5*ea1)", "description": "", "templateType": "anything", "can_override": false}, "bd": {"name": "bd", "group": "v2", "definition": "random(-10..10 except [0,-bb/bc])", "description": "", "templateType": "anything", "can_override": false}, "cvar1": {"name": "cvar1", "group": "Part c", "definition": "expression(cv1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "//coprime(cn1*cn2,cd1*cd2) and\n//coprime(dn1*dd2,dd1*dn2) and\n//coprime(fn1*fd2,fd1*fn2)", "maxRuns": 100}, "ungrouped_variables": ["Variables"], "variable_groups": [{"name": "Part a", "variables": ["aa", "ab", "ac", "VariablesA", "av1", "avar1", "av2", "avar2"]}, {"name": "v2", "variables": ["ba", "bb", "bc", "bd", "VariablesB", "bv1", "bvar1", "bv2", "bvar2"]}, {"name": "Part c", "variables": ["cn1", "cd1", "Factorisecd1", "Multiplescd1", "cn2", "cd2", "Factorisecd2", "Multiplescd2", "cin1", "cid1", "cin2", "cid2", "VariablesC", "cv1", "cvar1", "cv2", "cvar2"]}, {"name": "Part d", "variables": ["dn1", "dd1", "Factorisedd1", "Multiplesdd1", "dn2", "dd2", "Factorisedd2", "Multiplesdd2", "din1", "did1", "din2", "did2", "VariablesD", "dv1", "dvar1", "dv2", "dvar2"]}, {"name": "Part e", "variables": ["ea1", "eb1", "ec1", "ea2", "eb2", "ec2", "VariablesE", "ev1", "evar1", "ev2", "evar2", "ev3", "evar3"]}, {"name": "Part f", "variables": ["fa1", "fb1", "fc1", "fa2", "fb2", "fc2", "fn1", "fd1", "Factorisefd1", "Multiplesfd1", "fn2", "fd2", "Factorisefd2", "Multiplesfd2", "VariablesF", "fv1", "fvar1", "fv2", "fvar2", "fv3", "fvar3"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "6", "scripts": {"mark": {"script": "var pattern1 = \"\" + variables.ev2 + \"^\" + (variables.eb1+variables.eb2) + \"/(\" + variables.ev1 + \"^\" + (variables.ea2-variables.ea1) + variables.ev3 + \"^\" + (variables.ec1-variables.ec2) + \")\";\nvar pattern2 = Numbas.jme.display.simplifyExpression(pattern1,Numbas.jme.rules.simplificationRules.all,Numbas.jme.builtinScope);\nif (Numbas.jme.display.matchExpression(pattern1,this.studentAnswer,true)||Numbas.jme.display.matchExpression(pattern2,this.studentAnswer,true)) {\nthis.markingComment(\"Correct\");\nthis.answered = true;\nthis.setCredit(1);\n}\nelse {\nthis.invalidCell = true; // used by the validation script so it gives the right error message\nthis.answered = false;\nthis.setCredit(0,\"Incorrect\");\n}", "order": "instead"}}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify{{evar1}^{ea1}{evar2}^{eb1}/{evar3}^{ec1}}\\times\\simplify{({evar2}^{eb2}{evar3}^{ec2})/{evar1}^{ea2}}$

", "answer": "{evar2}^{eb1+eb2}/({evar1}^{ea2-ea1}{evar3}^{ec1-ec2})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Ahmed's copy of Expanding brackets question", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Hollie Tarr", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1176/"}, {"name": "Christopher Tedd", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1880/"}, {"name": "Billy Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3527/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "

Tags: algebra, expanding, simplifying

Last updated Sep 2019

", "licence": "None specified"}, "statement": "

Expand and simplify the following expression:

", "advice": "

$\\simplify[]{({f1}{fvar1}+{f2}{fvar2})({f3}{fvar1}+{f4}{fvar2})}$

\n

We need to multiply each term in the first bracket by both terms in the second bracket: we have

\n

$\\simplify[]{{f1}{fvar1}}\\times(\\simplify[]{{f3}{fvar1}+{f4}{fvar2}})=\\simplify[]{({f1}*{f3}){fvar1}^2+({f1}*{f4}){fvar1}{fvar2}={f1*f3}{fvar1}^2+{f1*f4}{fvar1}{fvar2}}$ and

\n

$\\simplify[]{{f2}{fvar2}}\\times(\\simplify[]{{f3}{fvar1}+{f4}{fvar2}})=\\simplify[]{({f2}*{f3}){fvar1}{fvar2}+{f2}*{f4}{fvar2}^2={f2*f3}{fvar1}{fvar2}+{f2*f4}{fvar2}^2}$. Then 

\n

\\[\\simplify[]{({f1}{fvar1}+{f2}{fvar2})({f3}{fvar1}+{f4}{fvar2})={f1*f3}{fvar1}^2+{f1*f4}{fvar1}{fvar2}+{f2*f3}{fvar1}{fvar2}+{f2*f4}{fvar2}^2}\\]

\n

\\[=\\simplify[]{{f1*f3}{fvar1}^2+({f1*f4}+{f2*f3}){fvar1}{fvar2}+{f2*f4}{fvar2}^2}\\]

\n

\\[=\\simplify[]{{f1*f3}{fvar1}^2+({f1*f4+f2*f3}){fvar1}{fvar2}+{f2*f4}{fvar2}^2}\\text{.}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a3": {"name": "a3", "group": "Part a", "definition": "random(-10..10 except [0,-a1*a2])", "description": "", "templateType": "anything", "can_override": false}, "fv1": {"name": "fv1", "group": "Part f", "definition": "Variables[VariablesF][0]", "description": "", "templateType": "anything", "can_override": false}, "c4": {"name": "c4", "group": "Part c", "definition": "random(-10..10 except [0,-c2*c3/c1])", "description": "", "templateType": "anything", "can_override": false}, "b3": {"name": "b3", "group": "Part b", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "VariablesB": {"name": "VariablesB", "group": "Part b", "definition": "random(0..length(Variables)-1 except VariablesA)", "description": "", "templateType": "anything", "can_override": false}, "d2": {"name": "d2", "group": "Part d", "definition": "random(-10..10 except -1..1)", "description": "", "templateType": "anything", "can_override": false}, "f2": {"name": "f2", "group": "Part f", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "dvar": {"name": "dvar", "group": "Part d", "definition": "expression(dv)", "description": "", "templateType": "anything", "can_override": false}, "e2": {"name": "e2", "group": "Part e", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "evar2": {"name": "evar2", "group": "Part e", "definition": "expression(ev2)", "description": "", "templateType": "anything", "can_override": false}, "f1": {"name": "f1", "group": "Part f", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Part b", "definition": "random(-10..10 except [0,-b1*b3])", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Part b", "definition": "random(-10..10 except -1..1)", "description": "", "templateType": "anything", "can_override": false}, "e4": {"name": "e4", "group": "Part e", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "dv": {"name": "dv", "group": "Part d", "definition": "Variables[VariablesD][0]", "description": "", "templateType": "anything", "can_override": false}, "fvar1": {"name": "fvar1", "group": "Part f", "definition": "expression(fv1)", "description": "", "templateType": "anything", "can_override": false}, "evar1": {"name": "evar1", "group": "Part e", "definition": "expression(ev1)", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Part a", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "VariablesA": {"name": "VariablesA", "group": "Part a", "definition": "random(0..length(Variables)-1)", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "Part d", "definition": "random(-10..10 except -2..2)", "description": "", "templateType": "anything", "can_override": false}, "cvar": {"name": "cvar", "group": "Part c", "definition": "expression(cv)", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Part a", "definition": "random(-10..10 except -1..1)", "description": "", "templateType": "anything", "can_override": false}, "ev2": {"name": "ev2", "group": "Part e", "definition": "Variables[VariablesE][1]", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "Part c", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "fvar2": {"name": "fvar2", "group": "Part f", "definition": "expression(fv2)", "description": "", "templateType": "anything", "can_override": false}, "e1": {"name": "e1", "group": "Part e", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "e3": {"name": "e3", "group": "Part e", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "VariablesE": {"name": "VariablesE", "group": "Part e", "definition": "random(0..length(Variables)-1 except [VariablesC,VariablesD])", "description": "", "templateType": "anything", "can_override": false}, "ev1": {"name": "ev1", "group": "Part e", "definition": "Variables[VariablesE][0]", "description": "", "templateType": "anything", "can_override": false}, "av": {"name": "av", "group": "Part a", "definition": "Variables[VariablesA][0]", "description": "", "templateType": "anything", "can_override": false}, "avar": {"name": "avar", "group": "Part a", "definition": "expression(av)", "description": "", "templateType": "anything", "can_override": false}, "VariablesD": {"name": "VariablesD", "group": "Part d", "definition": "random(0..length(Variables)-1 except [VariablesB,VariablesC])", "description": "", "templateType": "anything", "can_override": false}, "f3": {"name": "f3", "group": "Part f", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "f4": {"name": "f4", "group": "Part f", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Part c", "definition": "random(-10..10 except -1..1)", "description": "", "templateType": "anything", "can_override": false}, "cv": {"name": "cv", "group": "Part c", "definition": "Variables[VariablesC][0]", "description": "", "templateType": "anything", "can_override": false}, "bv": {"name": "bv", "group": "Part b", "definition": "Variables[VariablesB][0]", "description": "", "templateType": "anything", "can_override": false}, "fv2": {"name": "fv2", "group": "Part f", "definition": "Variables[VariablesF][1]", "description": "", "templateType": "anything", "can_override": false}, "bvar": {"name": "bvar", "group": "Part b", "definition": "expression(bv)", "description": "", "templateType": "anything", "can_override": false}, "Variables": {"name": "Variables", "group": "Ungrouped variables", "definition": "[['x','y','z'],['a','b','c'],['f','g','h'],['r','s','t'],['u','v','w'],['p','q','r']]", "description": "", "templateType": "anything", "can_override": false}, "VariablesF": {"name": "VariablesF", "group": "Part f", "definition": "random(0..length(Variables)-1 except VariablesE)", "description": "", "templateType": "anything", "can_override": false}, "c3": {"name": "c3", "group": "Part c", "definition": "random(-10..10 except -1..1)", "description": "", "templateType": "anything", "can_override": false}, "VariablesC": {"name": "VariablesC", "group": "Part c", "definition": "random(0..length(Variables)-1 except [VariablesA,VariablesB])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "f1*f4+f2*f3 <> 0", "maxRuns": 100}, "ungrouped_variables": ["Variables"], "variable_groups": [{"name": "Part a", "variables": ["a1", "a2", "a3", "VariablesA", "av", "avar"]}, {"name": "Part b", "variables": ["b1", "b2", "b3", "VariablesB", "bv", "bvar"]}, {"name": "Part c", "variables": ["c1", "c2", "c3", "c4", "VariablesC", "cv", "cvar"]}, {"name": "Part d", "variables": ["d1", "d2", "VariablesD", "dv", "dvar"]}, {"name": "Part e", "variables": ["e1", "e2", "e3", "e4", "VariablesE", "ev1", "evar1", "ev2", "evar2"]}, {"name": "Part f", "variables": ["f1", "f2", "f3", "f4", "VariablesF", "fv1", "fvar1", "fv2", "fvar2"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "6", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify[unitFactor]{({f1}{fvar1}+{f2}{fvar2})({f3}{fvar1}+{f4}{fvar2})}$

", "answer": "{f1*f3}{fvar1}^2+{f2*f4}{fvar2}^2+{f1*f4+f2*f3}{fvar1}*{fvar2}", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": true, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "(`+- $n`?*$v^2 `| -$v^2) + (`+- $n`?*$v*$v `| -$v*$v) + (`+- $n`?*$v^2 `| -$v^2)", "partialCredit": 0, "message": "Your answer has not been fully simplified.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Ahmed's copy of Factorisation question", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christopher Tedd", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1880/"}, {"name": "Billy Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3527/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": ["Arithmetic", "arithmetic", "factorising", "hw3"], "metadata": {"description": "

Tags: arithmetic, factorising

Last updated Sep 2019

", "licence": "None specified"}, "statement": "

Factorise the following expressions as far as possible:

", "advice": "

a) $\\simplify{{a}{PartAVariable1}-{a*b}{PartAVariable1}*{PartAVariable2}}$

\n

We look for the largest factor that is common to both terms. We see that both terms are a multiple of $\\simplify[]{{a}{PartAVariable1}}$. We take this out as a factor:

\n

\\[\\simplify{{a}{PartAVariable1}-{a*b}{PartAVariable1}*{PartAVariable2}}=\\simplify[]{({a}{PartAVariable1}*1-{a}{PartAVariable1}*{b}{PartAVariable2})={a}{PartAVariable1}(1-{b}{PartAVariable2})}\\text{.}\\]

\n

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"PartGLetter": {"name": "PartGLetter", "group": "Ungrouped variables", "definition": "VariableGroups[random(0..length(VariableGroups)-1)][0]", "description": "", "templateType": "anything", "can_override": false}, "bia2": {"name": "bia2", "group": "B", "definition": "random(3..9)", "description": "", "templateType": "anything", "can_override": false}, "bib2": {"name": "bib2", "group": "B", "definition": "random(3..9)", "description": "", "templateType": "anything", "can_override": false}, "PartBLetter1": {"name": "PartBLetter1", "group": "Ungrouped variables", "definition": "VariableGroups[PartBGroup][0]", "description": "", "templateType": "anything", "can_override": false}, "PartCLetter": {"name": "PartCLetter", "group": "Ungrouped variables", "definition": "VariableGroups[random(0..length(VariableGroups)-1)][-2]", "description": "", "templateType": "anything", "can_override": false}, "brb2": {"name": "brb2", "group": "B", "definition": "bib2-bcfb", "description": "", "templateType": "anything", "can_override": false}, "PartEVariable": {"name": "PartEVariable", "group": "Ungrouped variables", "definition": "expression(PartELetter)", "description": "", "templateType": "anything", "can_override": false}, "g1": {"name": "g1", "group": "G", "definition": "random(1..3)", "description": "", "templateType": "anything", "can_override": false}, "PartALetter2": {"name": "PartALetter2", "group": "Ungrouped variables", "definition": "VariableGroups[PartAGroup][1]", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "A", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "e1": {"name": "e1", "group": "c", "definition": "random(-9..9 except -2..2)", "description": "", "templateType": "anything", "can_override": false}, "PartFVariable": {"name": "PartFVariable", "group": "Ungrouped variables", "definition": "expression(PartFLetter)", "description": "", "templateType": "anything", "can_override": false}, "g4": {"name": "g4", "group": "G", "definition": "random(-6..6 except if(g3>1,[-3*g3,-2*g3,-g3,0,g3,2*g3,3*g3],0))", "description": "", "templateType": "anything", "can_override": false}, "e2": {"name": "e2", "group": "c", "definition": "random(-1,1)*e1", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "A", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "g3": {"name": "g3", "group": "G", "definition": "random(1..3)", "description": "", "templateType": "anything", "can_override": false}, "PartGVariable": {"name": "PartGVariable", "group": "Ungrouped variables", "definition": "expression(PartGLetter)", "description": "", "templateType": "anything", "can_override": false}, "PartDLetter": {"name": "PartDLetter", "group": "Ungrouped variables", "definition": "VariableGroups[random(0..length(VariableGroups)-1)][0]", "description": "", "templateType": "anything", "can_override": false}, "PartAGroup": {"name": "PartAGroup", "group": "Ungrouped variables", "definition": "random(0..length(VariableGroups)-1)", "description": "", "templateType": "anything", "can_override": false}, "VariableGroup1": {"name": "VariableGroup1", "group": "Ungrouped variables", "definition": "[ \"a\", \"b\", \"c\", \"d\" ]", "description": "", "templateType": "list of strings", "can_override": false}, "PartALetter1": {"name": "PartALetter1", "group": "Ungrouped variables", "definition": "VariableGroups[PartAGroup][0]", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "c", "definition": "random(-4..4 except [-c1,0])", "description": "", "templateType": "anything", "can_override": false}, "bcfa": {"name": "bcfa", "group": "B", "definition": "min(bia1,bia2)", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "c", "definition": "random(-4..4 except 0)", "description": "", "templateType": "anything", "can_override": false}, "brb1": {"name": "brb1", "group": "B", "definition": "bib1-bcfb", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "c", "definition": "random(-8..8 except -2..2)", "description": "", "templateType": "anything", "can_override": false}, "PartBLetter2": {"name": "PartBLetter2", "group": "Ungrouped variables", "definition": "VariableGroups[PartBGroup][1]", "description": "", "templateType": "anything", "can_override": false}, "PartFLetter": {"name": "PartFLetter", "group": "Ungrouped variables", "definition": "VariableGroups[random(0..length(VariableGroups)-1)][1]", "description": "", "templateType": "anything", "can_override": false}, "f1": {"name": "f1", "group": "c", "definition": "random(-10..10 except -3..3)", "description": "", "templateType": "anything", "can_override": false}, "PartAVariable2": {"name": "PartAVariable2", "group": "Ungrouped variables", "definition": "expression(PartALetter2)", "description": "", "templateType": "anything", "can_override": false}, "PartAVariable1": {"name": "PartAVariable1", "group": "Ungrouped variables", "definition": "expression(PartALetter1)", "description": "", "templateType": "anything", "can_override": false}, "bra1": {"name": "bra1", "group": "B", "definition": "bia1-bcfa", "description": "", "templateType": "anything", "can_override": false}, "PartBGroup": {"name": "PartBGroup", "group": "Ungrouped variables", "definition": "random(0..length(VariableGroups)-1 except PartAGroup)", "description": "", "templateType": "anything", "can_override": false}, "VariableGroups": {"name": "VariableGroups", "group": "Ungrouped variables", "definition": "[VariableGroup1,VariableGroup2,VariableGroup3]", "description": "", "templateType": "anything", "can_override": false}, "PartDVariable": {"name": "PartDVariable", "group": "Ungrouped variables", "definition": "expression(PartDLetter)", "description": "", "templateType": "anything", "can_override": false}, "PartBVariable2": {"name": "PartBVariable2", "group": "Ungrouped variables", "definition": "expression(PartBLetter2)", "description": "", "templateType": "anything", "can_override": false}, "bra2": {"name": "bra2", "group": "B", "definition": "bia2-bcfa", "description": "", "templateType": "anything", "can_override": false}, "f2": {"name": "f2", "group": "c", "definition": "random(-10..10 except [-f1,0])", "description": "", "templateType": "anything", "can_override": false}, "PartBVariable1": {"name": "PartBVariable1", "group": "Ungrouped variables", "definition": "expression(PartBLetter1)", "description": "", "templateType": "anything", "can_override": false}, "bcfb": {"name": "bcfb", "group": "B", "definition": "min(bib1,bib2)", "description": "", "templateType": "anything", "can_override": false}, "PartELetter": {"name": "PartELetter", "group": "Ungrouped variables", "definition": "VariableGroups[random(0..length(VariableGroups)-1)][-1]", "description": "", "templateType": "anything", "can_override": false}, "d2": {"name": "d2", "group": "c", "definition": "random(-8..8 except [-d1,-2,-1,0,1,2])", "description": "", "templateType": "anything", "can_override": false}, "PartCVariable": {"name": "PartCVariable", "group": "Ungrouped variables", "definition": "expression(PartCLetter)", "description": "", "templateType": "anything", "can_override": false}, "g2": {"name": "g2", "group": "G", "definition": "random(-6..6 except if(g1>1,[-3*g1,-2*g1,-g1,0,g1,2*g1,3*g1],0))", "description": "", "templateType": "anything", "can_override": false}, "VariableGroup3": {"name": "VariableGroup3", "group": "Ungrouped variables", "definition": "[ \"f\", \"g\", \"h\", \"j\" ]", "description": "", "templateType": "list of strings", "can_override": false}, "bia1": {"name": "bia1", "group": "B", "definition": "random(3..9)", "description": "", "templateType": "anything", "can_override": false}, "bib1": {"name": "bib1", "group": "B", "definition": "random(3..9)", "description": "", "templateType": "anything", "can_override": false}, "VariableGroup2": {"name": "VariableGroup2", "group": "Ungrouped variables", "definition": "[ \"x\", \"y\", \"z\", \"w\" ]", "description": "", "templateType": "list of strings", "can_override": false}}, "variablesTest": {"condition": "not ((bia1=bia2) and (bib1=bib2)) and\ng1+g3>2", "maxRuns": 100}, "ungrouped_variables": ["VariableGroups", "VariableGroup1", "VariableGroup2", "VariableGroup3", "PartAGroup", "PartBGroup", "PartALetter1", "PartAVariable1", "PartALetter2", "PartAVariable2", "PartBLetter1", "PartBVariable1", "PartBLetter2", "PartBVariable2", "PartCLetter", "PartCVariable", "PartDLetter", "PartDVariable", "PartELetter", "PartEVariable", "PartFLetter", "PartFVariable", "PartGLetter", "PartGVariable"], "variable_groups": [{"name": "A", "variables": ["a", "b"]}, {"name": "B", "variables": ["bia1", "bib1", "bia2", "bib2", "bcfa", "bcfb", "bra1", "brb1", "bra2", "brb2"]}, {"name": "c", "variables": ["c1", "c2", "d1", "d2", "e1", "e2", "f1", "f2"]}, {"name": "G", "variables": ["g1", "g2", "g3", "g4"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "4", "scripts": {"mark": {"script": "var pattern1 = \"\" + variables.a + variables.partaletter1 + \"(1-\" + variables.b + variables.partaletter2 + \")\";\nvar pattern1b = \"\" + variables.a + variables.partaletter1 + \"*(1-\" + variables.b + variables.partaletter2 + \")\";\nvar pattern2 = Numbas.jme.display.simplifyExpression(pattern1,Numbas.jme.rules.simplificationRules.all,Numbas.jme.builtinScope);\nvar pattern2b = Numbas.jme.display.simplifyExpression(pattern1b,Numbas.jme.rules.simplificationRules.all,Numbas.jme.builtinScope);\nif (Numbas.jme.display.matchExpression(pattern1,this.studentAnswer,true)||Numbas.jme.display.matchExpression(pattern2,this.studentAnswer,true)||Numbas.jme.display.matchExpression(pattern1b,this.studentAnswer,true)||Numbas.jme.display.matchExpression(pattern2b,this.studentAnswer,true)) {\nthis.markingComment(\"Correct\");\nthis.answered = true;\nthis.setCredit(1);\n}\nelse {\nthis.invalidCell = true; // used by the validation script so it gives the right error message\nthis.answered = false;\nthis.setCredit(0,\"Incorrect\");\n}", "order": "instead"}}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify{{a}{PartAVariable1}-{a*b}{PartAVariable1}*{PartAVariable2}}$

", "answer": "{a}{PartAVariable1}(1-{b}{PartAVariable2})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": true, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Linear equations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christopher Tedd", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1880/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Billy Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3527/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

Solve the following equation:

", "advice": "

a) $\\simplify{{a1}{PartAVariable}+{a2}={a3}+{a4}{PartAVariable}}$

\n

We rearrange to get all of the $\\simplify[basicplus]{{PartAVariable}}$ terms on one side of the equation and all the numbers on the other side:

\n

$\\simplify[basicplus]{{a1}{PartAVariable}-{a4}{PartAVariable}={a3}-{a2}}$

\n

$\\simplify[basicplus]{{a1-a4}{PartAVariable}={a3-a2}}$

\n

$\\simplify[!basic,basicplus]{{PartAVariable}={a3-a2}/{a1-a4}}=\\simplify{{a3-a2}/{a1-a4}}$.

\n

", "rulesets": {"basicplus": ["zeroPower", "unitPower", "unitFactor"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "e3": {"name": "e3", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "SolutionF2": {"name": "SolutionF2", "group": "Ungrouped variables", "definition": "expression(fsurd2)", "description": "", "templateType": "anything", "can_override": false}, "ansf2": {"name": "ansf2", "group": "Ungrouped variables", "definition": "if(f1<0,ansfmin,ansfplu)", "description": "", "templateType": "anything", "can_override": false}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "PartCVariable": {"name": "PartCVariable", "group": "Unnamed group", "definition": "expression(VariableNames[random(0..length(VariableNames)-1)])", "description": "", "templateType": "anything", "can_override": false}, "f1": {"name": "f1", "group": "Ungrouped variables", "definition": "random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "fsurd1": {"name": "fsurd1", "group": "Ungrouped variables", "definition": "if(fgcd=1,\"(-\" + f2 + \"-\" + fsurd + \")/\" + 2*f1,\"(-\" + f2/fgcd + \"-\" + dividesurdstring(fsurd,fgcd) + \")/\" + 2*f1/fgcd)", "description": "", "templateType": "anything", "can_override": false}, "fsurd2": {"name": "fsurd2", "group": "Ungrouped variables", "definition": "if(fgcd=1,\"(-\" + f2 + \"+\" + fsurd + \")/\" + 2*f1,\"(-\" + f2/fgcd + \"+\" + dividesurdstring(fsurd,fgcd) + \")/\" + 2*f1/fgcd)", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(-10..10 except -1..1)", "description": "", "templateType": "anything", "can_override": false}, "PartAVariable": {"name": "PartAVariable", "group": "Unnamed group", "definition": "expression(VariableNames[random(0..length(VariableNames)-1)])", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "esurd": {"name": "esurd", "group": "Ungrouped variables", "definition": "simplifysurd(1,e2,e3)", "description": "", "templateType": "anything", "can_override": false}, "SolutionF1": {"name": "SolutionF1", "group": "Ungrouped variables", "definition": "expression(fsurd1)", "description": "", "templateType": "anything", "can_override": false}, "esurd1": {"name": "esurd1", "group": "Ungrouped variables", "definition": "if(coprime(e2,2),\"(-\" + e2 + \"-\" + esurd + \")/2\",\"-\" + e2/2 + \"-\" + dividesurdstring(esurd,2))", "description": "", "templateType": "anything", "can_override": false}, "b3": {"name": "b3", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "anse2": {"name": "anse2", "group": "Ungrouped variables", "definition": "precround((-e2+sqrt(e2^2-4*e3))/2,2)", "description": "", "templateType": "anything", "can_override": false}, "PartFVariable": {"name": "PartFVariable", "group": "Unnamed group", "definition": "expression(VariableNames[random(0..length(VariableNames)-1)])", "description": "", "templateType": "anything", "can_override": false}, "fgcd": {"name": "fgcd", "group": "Ungrouped variables", "definition": "gcd(eval(expression(fsurd[0])),gcd(f2,2*f1))", "description": "", "templateType": "anything", "can_override": false}, "anse1": {"name": "anse1", "group": "Ungrouped variables", "definition": "precround((-e2-sqrt(e2^2-4*e3))/2,2)", "description": "", "templateType": "anything", "can_override": false}, "a4": {"name": "a4", "group": "Ungrouped variables", "definition": "random(-10..10 except [0,a1])", "description": "", "templateType": "anything", "can_override": false}, "esurd2": {"name": "esurd2", "group": "Ungrouped variables", "definition": "if(coprime(e2,2),\"(-\" + e2 + \"+\" + esurd + \")/2\",\"-\" + e2/2 + \"+\" + dividesurdstring(esurd,2))", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "VariableNames": {"name": "VariableNames", "group": "Unnamed group", "definition": "[ \"x\", \"y\", \"z\", \"w\", \"k\", \"q\" ]", "description": "", "templateType": "list of strings", "can_override": false}, "PartEVariable": {"name": "PartEVariable", "group": "Unnamed group", "definition": "expression(VariableNames[random(0..length(VariableNames)-1)])", "description": "", "templateType": "anything", "can_override": false}, "fsurd": {"name": "fsurd", "group": "Ungrouped variables", "definition": "simplifysurd(f1,f2,f3)", "description": "", "templateType": "anything", "can_override": false}, "ansf1": {"name": "ansf1", "group": "Ungrouped variables", "definition": "if(f1<0,ansfplu,ansfmin)", "description": "", "templateType": "anything", "can_override": false}, "d2": {"name": "d2", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "f3": {"name": "f3", "group": "Ungrouped variables", "definition": "random(-10..10 except -1..1)", "description": "", "templateType": "anything", "can_override": false}, "PartBVariable": {"name": "PartBVariable", "group": "Unnamed group", "definition": "expression(VariableNames[random(0..length(VariableNames)-1)])", "description": "", "templateType": "anything", "can_override": false}, "ansfmin": {"name": "ansfmin", "group": "Ungrouped variables", "definition": "precround((-f2-sqrt(f2^2-4*f1*f3))/(2*f1),2)", "description": "", "templateType": "anything", "can_override": false}, "SolutionE1": {"name": "SolutionE1", "group": "Ungrouped variables", "definition": "expression(esurd1)", "description": "", "templateType": "anything", "can_override": false}, "PartDVariable": {"name": "PartDVariable", "group": "Unnamed group", "definition": "expression(VariableNames[random(0..length(VariableNames)-1)])", "description": "", "templateType": "anything", "can_override": false}, "fdispsurd": {"name": "fdispsurd", "group": "Ungrouped variables", "definition": "expression(fsurd)", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "e2": {"name": "e2", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "SolutionE2": {"name": "SolutionE2", "group": "Ungrouped variables", "definition": "expression(esurd2)", "description": "", "templateType": "anything", "can_override": false}, "edispsurd": {"name": "edispsurd", "group": "Ungrouped variables", "definition": "expression(esurd)", "description": "", "templateType": "anything", "can_override": false}, "ansfplu": {"name": "ansfplu", "group": "Ungrouped variables", "definition": "precround((-f2+sqrt(f2^2-4*f1*f3))/(2*f1),2)", "description": "", "templateType": "anything", "can_override": false}, "f2": {"name": "f2", "group": "Ungrouped variables", "definition": "random(-10..10 except -1..1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "//c1>c2\n//and\n//d1>d2\n//and\n//sqrt((e2)^2-4*e3)<>round(sqrt((e2)^2-4*e3))\n//and\n//(e2)^2-4*e3>0\n//and\n//sqrt((f2)^2-4*f1*f3)<>round(sqrt((f2)^2-4*f1*f3))\n//and\n//(f2)^2-4*f1*f3>0\n//and\n//!((c1=d1) and (c2=d2))", "maxRuns": 100}, "ungrouped_variables": ["a1", "a2", "a3", "a4", "b1", "b2", "b3", "c1", "c2", "d1", "d2", "e2", "e3", "f1", "f2", "f3", "esurd", "edispsurd", "esurd1", "esurd2", "SolutionE1", "SolutionE2", "anse1", "anse2", "fsurd", "fdispsurd", "fgcd", "fsurd1", "fsurd2", "SolutionF1", "SolutionF2", "ansf1", "ansf2", "ansfmin", "ansfplu"], "variable_groups": [{"name": "Unnamed group", "variables": ["VariableNames", "PartAVariable", "PartBVariable", "PartCVariable", "PartDVariable", "PartEVariable", "PartFVariable"]}], "functions": {"dividesurdstring": {"parameters": [["surd", "string"], ["n", "number"]], "type": "number", "language": "javascript", "definition": "var m = surd[0];\nvar d = m/n;\nvar dividesurdstring = d + surd.substring(1);\nreturn dividesurdstring;"}, "factorised": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["plusorminus", "string"]], "type": "number", "language": "javascript", "definition": "var discriminant = b*b-4*a*c;\nvar multiplier = 1;\nvar factorised = \"\";\nfor (var i=25;i>1;i--) {\n if ((discriminant % (i*i)) == 0) {\n multiplier *= i;\n discriminant /= i*i;\n }\n}\nsurd = multiplier + \"*sqrt(\" + discriminant + \")\";\nvar gcd = math.gcd(math.abs(b),multiplier);\nif (gcd>1) {\n b /= gcd;\n multiplier /= gcd;\n}\nfactorised = gcd + \"*(\" + b + plusorminus + multiplier + \"*sqrt(\" + discriminant + \"))\";\nreturn factorised;"}, "simplifysurd": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "type": "number", "language": "javascript", "definition": "var discriminant = b*b-4*a*c;\nvar multiplier = 1;\nvar surd = \"\";\nfor (var i=25;i>1;i--) {\n if ((discriminant % (i*i)) == 0) {\n multiplier *= i;\n discriminant = discriminant/(i*i);\n }\n}\nsurd = multiplier + \"*sqrt(\" + discriminant + \")\";\nreturn surd;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify{{a1}{PartAVariable}+{a2}={a3}+{a4}{PartAVariable}}$

\n

\n

$\\simplify{{PartAVariable}}=$[[0]]

\n

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "6", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{(a3-a2)/(a1-a4)}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Linear inequalities", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "

In the first three parts, rearrange linear inequalities to make $x$ the subject.

\n

In the last four parts, correctly give the direction of the inequality sign after rearranging an inequality.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Solve the following linear inequality. Make sure you choose the correct inequality sign from the drop down box. State your answer as a fraction if applicable.

", "advice": "

As with regular linear equations, we aim to isolate the variable by subtracting any constants when dividing by the $x$ coefficient. The only major difference is that when we divide or multiply by a negative number, the inequality sign is reversed.

\n

For example, the following inequality is true:

\n

\\[ -3 \\lt -2 \\]

\n

When we multiply both sides by $-2$, the inequality sign must reverse:

\n

\\[ 6 \\gt 4 \\]

\n

\n

\n

In this example, separate the constants and the $x$-term, then divide by the $x$-coefficient to find an inequality for $x$.

\n

\\begin{align}
\\simplify{{b[0]}x-{b[1]}}&<\\simplify{{b[3]}-{b[2]}x}\\\\[1em]
\\simplify{({b[0]}+{b[2]})x}&<\\simplify{{b[3]}+{b[1]}}\\\\[1em]
x&<\\simplify{({b[3]}+{b[1]})/({b[0]}+{b[2]})}\\text{.}\\\\[1em]
\\end{align}

\n

", "rulesets": {}, "variables": {"b": {"name": "b", "group": "Ungrouped variables", "definition": "repeat(random(11..20),10)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2,3,6)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "repeat(random(2..10),10)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify{{b[0]}x-{b[1]}<{b[3]}-{b[2]}x}$

\n

$x$  [[1]]  [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({b[3]}+{b[1]})/({b[0]}+{b[2]})", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

>

", "

<

"], "matrix": ["1", "2"], "distractors": ["", ""]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Solving linear simultaneous equations ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Billy Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3527/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": ["elimination", "linear simultaneous equations", "solving linear simultaneous equations by elimination", "taxonomy"], "metadata": {"description": "

This question tests the student's ability to solve simple linear equations by elimination. Part a) involves only having to manipulate one equation in order to solve, and part b) involves having to manipulate both equations in order to solve. 

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "

a)

\n

\\begin{align}
\\var{h}x+\\var{k}y&=\\var{m}\\text{,}\\\\
\\var{j}x-\\var{l}y&=\\var{n}\\text{.}\\\\
\\end{align}

\n

To find the solution to these equations, we need to cancel one of the unknowns.

\n

Notice that $\\var{h}x$ in the first equation can be multiplied by $\\var{j/h}$ to match $\\var{j}x$ in the second equation. This means that we will only have to manipulate the first equation and can leave the second equation as it is.

\n

We have to multiply the entire first equation by $\\var{j/h}$, not just the $x$ term to ensure the equation still holds. 

\n

$\\var{h}x+\\var{k}y=\\var{m}$ multiplied by $\\var{j/h}$ gives $\\var{j}x+\\var{k*(j/h)}y=\\var{m*(j/h)}.$

\n

We now have a common $x$ term and we can cancel this by subtracting one equation from the other to find the $y$ term. 

\n

\\begin{align}
&&\\var{j}x+\\var{k*{j/h}}y&=\\var{m*(j/h)}\\\\
-&&\\var{j}x-\\var{l}y&=\\var{n}\\\\
&&\\overline{\\qquad} & \\overline{\\qquad}\\\\
&&0x+\\var{k*(j/h)+l}y&=\\var{m*(j/h)-n}\\\\[1em]
&&y&=\\frac{\\var{m*j/h-n}}{\\var{k*j/h+l}}\\\\
&&y&=\\var{y1}
\\end{align}

\n

We can find the corresponding value of $x$ by substituting this value for $y$ back into either of the original equations.

\n

\\begin{align}
\\var{h}x+(\\var{k}\\times\\var{y1})&=\\var{m}\\text{,}\\\\
\\var{h}x+\\var{k*y1}&=\\var{m}\\text{,}\\\\
\\var{h}x&=\\var{m-(k*y1)}\\text{,}\\\\
x&=\\var{x1}\\text{.}\\\\
\\end{align}

\n

Therefore, $x=\\var{x1}$ and $y=\\var{y1}$.

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"c": {"name": "c", "group": "Part b", "definition": "a*x2+b*y2", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Part b", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "numerator": {"name": "numerator", "group": "part a", "definition": "m*(j/h)-n", "description": "", "templateType": "anything", "can_override": false}, "l": {"name": "l", "group": "part a", "definition": "random(1..6)", "description": "

Constant part of the LHS of the second equation in part a

", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "part a", "definition": "j*x1 + l*y1", "description": "

RHS of the second equation in part a

", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Part b", "definition": "d*x2+f*y2", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "part a", "definition": "h*x1 + k*y1", "description": "

RHS of the first equation in part a

", "templateType": "anything", "can_override": false}, "divisor": {"name": "divisor", "group": "part a", "definition": "k*(j/h)+l", "description": "", "templateType": "anything", "can_override": false}, "y1": {"name": "y1", "group": "part a", "definition": "random(-5..-1)*sgn(x1)", "description": "

Value of $x$ in part a

", "templateType": "anything", "can_override": false}, "y2": {"name": "y2", "group": "Part b", "definition": "random(-5..-1)*sgn(x2)", "description": "

Value of $y$ in part b

", "templateType": "anything", "can_override": false}, "x2": {"name": "x2", "group": "Part b", "definition": "random(-5..5)", "description": "

Value of $x$ in part b

", "templateType": "anything", "can_override": false}, "x1": {"name": "x1", "group": "part a", "definition": "random(-5..5)", "description": "

Value of $x$ in part a

", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "part a", "definition": "random(1..6)", "description": "

Constant part of the LHS of the first equation in part a

", "templateType": "anything", "can_override": false}, "j": {"name": "j", "group": "part a", "definition": "h*random(2..3)", "description": "

$x$ coefficient of the second equation in part a. An integer multiple of the $x$ coefficient of the second equation.

", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Part b", "definition": "random(a+1..7)", "description": "

Coefficient of $y$ in the first equation of part b.

\n

", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Part b", "definition": "random(max(a,b)+1..12 except map(j*b,j,0..10/b))", "description": "

$y$ coefficient of the second equation in part b. Never an integer multiple of the $y$ coefficient in the first equation.

", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "part a", "definition": "random(2..5)", "description": "

$x$ coefficient of the first equation in part a

", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Part b", "definition": "random(a+1..9 except map(j*a,j,0..10/a))", "description": "

$x$ coefficient in the second equation of part b. Never an integer multiple of the $x$ coefficient in the first equation.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "lcm(a,d) j*k", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Part b", "variables": ["a", "b", "c", "d", "f", "g", "x2", "y2"]}, {"name": "part a", "variables": ["h", "j", "k", "l", "m", "n", "y1", "x1", "numerator", "divisor"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Solve this set of simultaneous equations and give your answers for $x$ and $y$ below.

\n

\\begin{align}
\\simplify{{h}x+{k}y} &= \\var{m} \\text{,} \\\\
\\simplify{{j}x+{l}y} &= \\var{n} \\text{.}
\\end{align}

\n

$x =$ [[0]]

\n

$y =$ [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "x1", "maxValue": "x1", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "y1", "maxValue": "y1", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Quadratic equations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christopher Tedd", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1880/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Billy Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3527/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "

Tags: algebra, equations (linear), equations (quadratic)

Last updated Sep 2019

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Solve the following quadratic equations by factorising and/or using the quadratic formula below. Make sure to write your answers in ascending order.

\n

\n\n\n\n\n\n\n
\n

\n

if $\\color{red}{a}\\var{partcvariable}^2+\\color{blue}{b}\\var{partcvariable}+\\color{green}{c} = 0$, then:

\n

$ $

\n

$\\var{partcvariable}=\\dfrac{-(\\color{blue}{b})\\pm \\sqrt {(\\color{blue}{b})^2-4(\\color{red}{a})(\\color{green}{c})}}{2(\\color{red}{a})}$

\n
\n

\n

\n

", "advice": "

\n

a) $\\simplify{{PartCVariable}^2+({c1+c2}){PartCVariable}+{c1*c2}}=0$

\n

We try to solve the above equation by factorising it, that is, we want to write it as

\n

$(\\simplify{{PartCVariable}}+\\alpha)(\\simplify{{PartCVariable}}+\\beta)=0$

\n

for some numbers $\\alpha$ and $\\beta$; we need these two numbers to multiply to make $\\simplify[]{{c1*c2}}$ and sum to make $\\simplify{{c1+c2}}$; we see that we can take $\\simplify{{c1}}$ and $\\simplify{{c2}}$, since $\\simplify[!basic]{{c1}*{c2}={c1*c2}}$ and $\\simplify[!basic]{{c1}+{c2}={c1+c2}}$. Then our factorisation is

\n

\\[\\simplify{{PartCVariable}^2+{c1+c2}{PartCVariable}+{c1*c2}}=\\simplify{({PartCVariable}+{c1})({PartCVariable}+{c2})}\\text{.}\\]

\n

\n

b) $\\simplify{{PartEVariable}^2+{e2}{PartEVariable}+{e3}}=0$

\n

We find we are unable to factorise the above equation into the form $(\\simplify{{PartEVariable}}+\\alpha)(\\simplify{{PartEVariable}}+\\beta)=0$, therefore we use the quadratic formula. Then,

\n

$\\simplify{{PartEVariable}}=\\frac{-b\\pm\\sqrt{b^2-4ac}}{2a}$,

\n

where $a=1$, $b=\\var{e2}$ and $c=\\var{e3}$. Therefore

\n

$\\simplify{{PartEVariable}}=\\frac{-(\\var{e2})\\pm\\sqrt{(\\var{e2})^2-(4\\times 1\\times\\var{e3}})}{2\\times 1}=\\frac{\\simplify{-{e2}}\\pm\\sqrt{\\simplify[all,!collectNumbers]{{e2*e2}-{4*e3}}}}{2}=\\frac{\\simplify{-{e2}}\\pm\\sqrt{\\simplify{{e2*e2-4*e3}}}}{2}=\\frac{\\simplify[]{-{e2}}\\pm\\simplify[basicplus]{{edispsurd}}}{2}$, giving the solutions

\n

$\\simplify[basicplus]{{PartEVariable}={SolutionE1}}=\\var{anse1}$ to 2 d.p.

\n

and

\n

$\\simplify[basicplus]{{PartEVariable}={SolutionE2}}=\\var{anse2}$ to 2 d.p.

\n

\n

", "rulesets": {"basicplus": ["zeroPower", "unitPower", "unitFactor"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"PartFVariable": {"name": "PartFVariable", "group": "Unnamed group", "definition": "expression(VariableNames[random(0..length(VariableNames)-1)])", "description": "", "templateType": "anything", "can_override": false}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "PartEVariable": {"name": "PartEVariable", "group": "Unnamed group", "definition": "expression(VariableNames[random(0..length(VariableNames)-1)])", "description": "", "templateType": "anything", "can_override": false}, "SolutionE2": {"name": "SolutionE2", "group": "Ungrouped variables", "definition": "expression(esurd2)", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "SolutionE1": {"name": "SolutionE1", "group": "Ungrouped variables", "definition": "expression(esurd1)", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "ansfplu": {"name": "ansfplu", "group": "Ungrouped variables", "definition": "precround((-f2+sqrt(f2^2-4*f1*f3))/(2*f1),2)", "description": "", "templateType": "anything", "can_override": false}, "fgcd": {"name": "fgcd", "group": "Ungrouped variables", "definition": "gcd(eval(expression(fsurd[0])),gcd(f2,2*f1))", "description": "", "templateType": "anything", "can_override": false}, "fsurd2": {"name": "fsurd2", "group": "Ungrouped variables", "definition": "if(fgcd=1,\"(-\" + f2 + \"+\" + fsurd + \")/\" + 2*f1,\"(-\" + f2/fgcd + \"+\" + dividesurdstring(fsurd,fgcd) + \")/\" + 2*f1/fgcd)", "description": "", "templateType": "anything", "can_override": false}, "VariableNames": {"name": "VariableNames", "group": "Unnamed group", "definition": "[ \"x\", \"y\", \"z\", \"w\", \"k\", \"q\" ]", "description": "", "templateType": "list of strings", "can_override": false}, "fsurd": {"name": "fsurd", "group": "Ungrouped variables", "definition": "simplifysurd(f1,f2,f3)", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "ansfmin": {"name": "ansfmin", "group": "Ungrouped variables", "definition": "precround((-f2-sqrt(f2^2-4*f1*f3))/(2*f1),2)", "description": "", "templateType": "anything", "can_override": false}, "b3": {"name": "b3", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "f2": {"name": "f2", "group": "Ungrouped variables", "definition": "random(-10..10 except -1..1)", "description": "", "templateType": "anything", "can_override": false}, "PartDVariable": {"name": "PartDVariable", "group": "Unnamed group", "definition": "expression(VariableNames[random(0..length(VariableNames)-1)])", "description": "", "templateType": "anything", "can_override": false}, "a4": {"name": "a4", "group": "Ungrouped variables", "definition": "random(-10..10 except [0,a1])", "description": "", "templateType": "anything", "can_override": false}, "ansf2": {"name": "ansf2", "group": "Ungrouped variables", "definition": "if(f1<0,ansfmin,ansfplu)", "description": "", "templateType": "anything", "can_override": false}, "anse1": {"name": "anse1", "group": "Ungrouped variables", "definition": "precround((-e2-sqrt(e2^2-4*e3))/2,2)", "description": "", "templateType": "anything", "can_override": false}, "PartBVariable": {"name": "PartBVariable", "group": "Unnamed group", "definition": "expression(VariableNames[random(0..length(VariableNames)-1)])", "description": "", "templateType": "anything", "can_override": false}, "fdispsurd": {"name": "fdispsurd", "group": "Ungrouped variables", "definition": "expression(fsurd)", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "f3": {"name": "f3", "group": "Ungrouped variables", "definition": "random(-10..10 except -1..1)", "description": "", "templateType": "anything", "can_override": false}, "PartAVariable": {"name": "PartAVariable", "group": "Unnamed group", "definition": "expression(VariableNames[random(0..length(VariableNames)-1)])", "description": "", "templateType": "anything", "can_override": false}, "PartCVariable": {"name": "PartCVariable", "group": "Unnamed group", "definition": "expression(VariableNames[0])", "description": "", "templateType": "anything", "can_override": false}, "e3": {"name": "e3", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "d2": {"name": "d2", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "esurd2": {"name": "esurd2", "group": "Ungrouped variables", "definition": "if(coprime(e2,2),\"(-\" + e2 + \"+\" + esurd + \")/2\",\"-\" + e2/2 + \"+\" + dividesurdstring(esurd,2))", "description": "", "templateType": "anything", "can_override": false}, "esurd1": {"name": "esurd1", "group": "Ungrouped variables", "definition": "if(coprime(e2,2),\"(-\" + e2 + \"-\" + esurd + \")/2\",\"-\" + e2/2 + \"-\" + dividesurdstring(esurd,2))", "description": "", "templateType": "anything", "can_override": false}, "e2": {"name": "e2", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "esurd": {"name": "esurd", "group": "Ungrouped variables", "definition": "simplifysurd(1,e2,e3)", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "fsurd1": {"name": "fsurd1", "group": "Ungrouped variables", "definition": "if(fgcd=1,\"(-\" + f2 + \"-\" + fsurd + \")/\" + 2*f1,\"(-\" + f2/fgcd + \"-\" + dividesurdstring(fsurd,fgcd) + \")/\" + 2*f1/fgcd)", "description": "", "templateType": "anything", "can_override": false}, "ansf1": {"name": "ansf1", "group": "Ungrouped variables", "definition": "if(f1<0,ansfplu,ansfmin)", "description": "", "templateType": "anything", "can_override": false}, "f1": {"name": "f1", "group": "Ungrouped variables", "definition": "random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "anse2": {"name": "anse2", "group": "Ungrouped variables", "definition": "precround((-e2+sqrt(e2^2-4*e3))/2,2)", "description": "", "templateType": "anything", "can_override": false}, "SolutionF1": {"name": "SolutionF1", "group": "Ungrouped variables", "definition": "expression(fsurd1)", "description": "", "templateType": "anything", "can_override": false}, "SolutionF2": {"name": "SolutionF2", "group": "Ungrouped variables", "definition": "expression(fsurd2)", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(-10..10 except -1..1)", "description": "", "templateType": "anything", "can_override": false}, "edispsurd": {"name": "edispsurd", "group": "Ungrouped variables", "definition": "expression(esurd)", "description": "", "templateType": "anything", "can_override": false}, "altfsurd1": {"name": "altfsurd1", "group": "Ungrouped variables", "definition": "if(fgcd=1,\"(-\" + f2 + \"-\" + fsurd + \")/\" + 2*f1,\"(-\" + f2/fgcd + \"-\" + dividesurdstring(fsurd,fgcd) + \")/\" + 2*f1/fgcd)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "c1>c2\n//and\n//d1>d2\n//and\n//sqrt((e2)^2-4*e3)<>round(sqrt((e2)^2-4*e3))\n//and\n//(e2)^2-4*e3>0\n//and\n//sqrt((f2)^2-4*f1*f3)<>round(sqrt((f2)^2-4*f1*f3))\n//and\n//(f2)^2-4*f1*f3>0\n//and\n//!((c1=d1) and (c2=d2))", "maxRuns": 100}, "ungrouped_variables": ["a1", "a2", "a3", "a4", "b1", "b2", "b3", "c1", "c2", "d1", "d2", "e2", "e3", "f1", "f2", "f3", "esurd", "edispsurd", "esurd1", "esurd2", "SolutionE1", "SolutionE2", "anse1", "anse2", "fsurd", "fdispsurd", "fgcd", "fsurd1", "fsurd2", "SolutionF1", "SolutionF2", "ansf1", "ansf2", "ansfmin", "ansfplu", "altfsurd1"], "variable_groups": [{"name": "Unnamed group", "variables": ["VariableNames", "PartAVariable", "PartBVariable", "PartCVariable", "PartDVariable", "PartEVariable", "PartFVariable"]}], "functions": {"simplifysurd": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "type": "number", "language": "javascript", "definition": "var discriminant = b*b-4*a*c;\nvar multiplier = 1;\nvar surd = \"\";\nfor (var i=25;i>1;i--) {\n if ((discriminant % (i*i)) == 0) {\n multiplier *= i;\n discriminant = discriminant/(i*i);\n }\n}\nsurd = multiplier + \"*sqrt(\" + discriminant + \")\";\nreturn surd;"}, "factorised": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["plusorminus", "string"]], "type": "number", "language": "javascript", "definition": "var discriminant = b*b-4*a*c;\nvar multiplier = 1;\nvar factorised = \"\";\nfor (var i=25;i>1;i--) {\n if ((discriminant % (i*i)) == 0) {\n multiplier *= i;\n discriminant /= i*i;\n }\n}\nsurd = multiplier + \"*sqrt(\" + discriminant + \")\";\nvar gcd = math.gcd(math.abs(b),multiplier);\nif (gcd>1) {\n b /= gcd;\n multiplier /= gcd;\n}\nfactorised = gcd + \"*(\" + b + plusorminus + multiplier + \"*sqrt(\" + discriminant + \"))\";\nreturn factorised;"}, "dividesurdstring": {"parameters": [["surd", "string"], ["n", "number"]], "type": "number", "language": "javascript", "definition": "var m = surd[0];\nvar d = m/n;\nvar dividesurdstring = d + surd.substring(1);\nreturn dividesurdstring;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Give your answers in ascending order

\n

$\\simplify{{PartCVariable}^2+({c1+c2}){PartCVariable}+{c1*c2}}=0$

\n

$\\simplify{{PartCVariable}}=$[[0]] or [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{-c1}", "maxValue": "{-c1}", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{-c2}", "maxValue": "{-c2}", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Equation of the line and gradient", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christopher Tedd", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1880/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Billy Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3527/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

Write the following equation in the standard form $y=mx+c$ and state the gradient of the line given by the equation.

", "advice": "

We need to put the $\\simplify{{a1}x}$ on the other side of the equation. Therefore

\n

$\\simplify{y+{a1}x={a2}}$

\n

becomes

\n

$\\simplify{y=-{a1}x+{a2}}$.

\n

When a line is given by an equation in the standard form, the gradient is the number before the $x$. Therefore the gradient of the line given by this equation is $\\simplify{-{a1}}$.

\n

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"d4": {"name": "d4", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(-15..15 except 0)", "description": "", "templateType": "anything", "can_override": false}, "e1": {"name": "e1", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "e5": {"name": "e5", "group": "Ungrouped variables", "definition": "random(-1,1)*random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "d3": {"name": "d3", "group": "Ungrouped variables", "definition": "random(-1,1)*random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(-15..15 except [-c1,0,c1])", "description": "", "templateType": "anything", "can_override": false}, "e3": {"name": "e3", "group": "Ungrouped variables", "definition": "random(-1,1)*random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(-1,1)*random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "d2": {"name": "d2", "group": "Ungrouped variables", "definition": "random(-20..20 except 0)", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(-15..15 except 0)", "description": "", "templateType": "anything", "can_override": false}, "e4": {"name": "e4", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "c3": {"name": "c3", "group": "Ungrouped variables", "definition": "random(-15..15 except 0)", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(-1,1)*random(2..15)", "description": "", "templateType": "anything", "can_override": false}, "e2": {"name": "e2", "group": "Ungrouped variables", "definition": "random(-20..20 except 0)", "description": "", "templateType": "anything", "can_override": false}, "d5": {"name": "d5", "group": "Ungrouped variables", "definition": "random(-1,1)*random(2..5)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "abs(b1)/gcd(abs(b1),abs(b2))<=6\nand\ngcd(d1,abs(d3*d5))>1\nand\nabs(b1)/gcd(abs(b1),abs(b2))<=6", "maxRuns": 100}, "ungrouped_variables": ["a1", "a2", "b1", "b2", "c1", "c2", "c3", "d1", "d2", "d3", "d4", "d5", "e1", "e2", "e3", "e4", "e5"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify{y+{a1}x={a2}}$

\n

$y=$[[0]]

\n

Gradient=[[1]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "-{a1}x+{a2}", "answerSimplification": "basic,unitFactor,zeroTerm", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-{a1}", "maxValue": "-{a1}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Ahmed's copy of Gradient and intercepts", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christopher Tedd", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1880/"}, {"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

Consider the line given by $\\simplify{y={a1}x+{a2}}$

", "advice": "

a) The gradient is given by the number before the $x$. Therefore the gradient of this line is $\\simplify{{a1}}$.

\n

b) The $y$-intercept is the point at which the line crosses the $y$-axis. The $y$-axis is where $x=0$. Therefore we set $x$ equal to $0$ in our equation to find the $y$ value. We get

\n

$y=(\\simplify[alwaysTimes]{{a1}0})+\\var{a2}=\\var{a2}$

\n

and so the $y$-intercept is the point $(0,\\var{a2})$.

\n

c) The $x$-intercept is the point at which the line crosses the $x$-axis. The $x$-axis is where $y=0$. Therefore we set $y$ equal to $0$ in our equation, and solve to find the $x$ value. We get

\n

$0=\\simplify{{a1}x}+\\var{a2}$

\n

$\\simplify{-{a2}}=\\simplify{{a1}x}$

\n

$\\frac{\\simplify{-{a2}}}{\\simplify{{a1}}}=x$

\n

therefore $x=\\simplify[fractionNumbers]{-{a2/a1}}$ and so the $x$-intercept is the point $(\\simplify[fractionNumbers]{-{a2/a1}},0)$.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(-15..15 except -1..1)", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(-15..15 except 0)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a1", "a2"], "variable_groups": [], "functions": {"GetSolutionB": {"parameters": [["Gradient", "number"]], "type": "number", "language": "javascript", "definition": "var Solution = \"The $x$-intercept is the point at which the line crosses the $x$-axis. The $x$-axis is where $y=0$. Therefore we set $y$ equal to $0$ in our equation, and solve to find the $x$ value. We get

\";\n\nSolution += \"$0=\\\\simplify{{a1}x}+\\\\var{a2}$

\";\n\nSolution += \"$\\\\simplify{-{a2}}=\\\\simplify{{a1}x}$

\";\n\nSolution += \"$\\\\frac{\\\\simplify{-{a2}}}{\\\\simplify{{a1}}}=x$

;\"\n\nSolution += \"therefore $x=\\\\simplify[fractionNumbers]{(-{a2})/{a1}}$ and so the $x$-intercept is the point $(\\\\simplify[fractionNumbers]{(-{a2})/{a1}},0)$.\";\n\nreturn Solution;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Give the gradient of the line.

\n

Gradient=[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{a1}", "maxValue": "{a1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Give the $y$-intercept of the line.

\n

([[0]],[[1]])

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "0", "maxValue": "0", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{a2}", "maxValue": "{a2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Give the $x$-intercept of the line.

\n

([[0]],[[1]])

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "-{a2/a1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "0", "maxValue": "0", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "typeendtoleave": false, "startpassword": "", "autoSubmit": true, "allowAttemptDownload": true, "downloadEncryptionKey": "", "showresultspage": "oncompletion"}, "timing": {"allowPause": false, "timeout": {"action": "warn", "message": "

Your time is up, please do not close the Performance Summary window, and kindly let an invigilator know that you have finished the test.

"}, "timedwarning": {"action": "warn", "message": "

5 minutes left!

"}}, "feedback": {"enterreviewmodeimmediately": true, "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview", "allowrevealanswer": false, "intro": "", "end_message": "", "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": [], "reviewshowexpectedanswer": true, "showanswerstate": true, "reviewshowfeedback": true, "showactualmark": true, "showtotalmark": true, "reviewshowscore": true, "reviewshowadvice": true}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Radu Dragomir Manac", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2821/"}, {"name": "Billy Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3527/"}, {"name": "Ahmed Al-Razaz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4865/"}], "extensions": [], "custom_part_types": [], "resources": []}