// Numbas version: exam_results_page_options {"name": "FY001 In Class Test", "metadata": {"description": "

FY001 In Class Test

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "duration": 5400, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "In class test", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], [], []], "questions": [{"name": "Ugur's copy of Algebra: Solving quadratics by factorising", "extensions": [], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

\n

You can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by {settings['separator']}.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentThe separate items in the student's answer

", "definition": "let(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)"}, {"name": "expected_numbers", "description": "", "definition": "let(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)"}, {"name": "valid_numbers", "description": "

Is every number in the student's list valid?

", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "

Are the student's answers in ascending order?

", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "

Is each number in the expected answer present in the student's list the correct number of times?

", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentHas every number been included the right number of times?

", "definition": "all(included)"}, {"name": "no_extras", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "

Should the answer be considered as a set, so the number of times an element occurs doesn't matter?

", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "

Numbers included in the student's answer that are not in the expected list.

", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Some quadratics are to be solved by factorising

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

Solve the quadratic equations by factorising. If there is more than one solution, enter them all separated by a comma.

\n

-----------------------------------

", "advice": "

See 5.1 and 5.2 for how to use factorising to solve quadratics.

\n

See 3.3 and 3.5 for factorising.

", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"d": {"name": "d", "group": "Ungrouped variables", "definition": "map(num[j][3],j,0..4)", "description": "", "templateType": "anything", "can_override": false}, "solmin": {"name": "solmin", "group": "Ungrouped variables", "definition": "vector([min(-d[0]/c[0],-b[0]/a[0])]+[min(-d[1]/c[1],-b[1]/a[1])]+[min(-d[2]/c[2],-b[2]/a[2])]+[min(-d[3]/c[3],-b[3]/a[3])]+[min(-d[4]/c[4],-b[4]/a[4])])", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "map(num[j][1],j,0..4)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "map(num[j][2],j,0..4)", "description": "", "templateType": "anything", "can_override": false}, "solmax": {"name": "solmax", "group": "Ungrouped variables", "definition": "vector([max(-d[0]/c[0],-b[0]/a[0])]+[max(-d[1]/c[1],-b[1]/a[1])]+[max(-d[2]/c[2],-b[2]/a[2])]+[max(-d[3]/c[3],-b[3]/a[3])]+[max(-d[4]/c[4],-b[4]/a[4])])", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "map(num[j][0],j,0..4)", "description": "", "templateType": "anything", "can_override": false}, "num": {"name": "num", "group": "Ungrouped variables", "definition": "[[1,random(6..7),1,random(2..5)]] +\nshuffle([\n [1,random(-4..-6),1,random(-3..3 except 0)],\n [1,random(-4..-6),random(2..3),random(-1..1 except 0)],\n [1,random(1,3,5),4,random(1,3,5)*random([1,-1])],\n [1,random(-4..-6),3,random([-1,1,-2,2])]\n ])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["num", "a", "b", "c", "d", "solmax", "solmin"], "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": "

Factorise $\\simplify{{a[0]*c[0]}x^2+{a[0]*d[0]+b[0]*c[0]}x+ {b[0]*d[0]}}=$ [[0]]

\n

Hence solve $\\simplify{{a[0]*c[0]}x^2+{a[0]*d[0]+b[0]*c[0]}x+ {b[0]*d[0]}}=0$.

\n

[[1]]

\n

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({a[0]}x+{b[0]})({c[0]}x+{d[0]})", "answerSimplification": "std", "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": [")("], "showStrings": false, "partialCredit": 0, "message": ""}, "notallowed": {"strings": ["x^2", "x*x", "x x", "x(", "x*("], "showStrings": false, "partialCredit": 0, "message": ""}, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "[solmin[0],solmax[0]]", "allowFractions": true, "correctAnswerFractions": true, "isSet": false}}], "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": "

Factorise $\\simplify{{a[1]*c[1]}x^2+{a[1]*d[1]+b[1]*c[1]}x+ {b[1]*d[1]}}=$ [[0]]

\n

Hence solve $\\simplify{{a[1]*c[1]}x^2+{a[1]*d[1]+b[1]*c[1]}x+ {b[1]*d[1]}}=0$.

\n

[[1]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({a[1]}x+{b[1]})({c[1]}x+{d[1]})", "answerSimplification": "std", "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": [")("], "showStrings": false, "partialCredit": 0, "message": ""}, "notallowed": {"strings": ["x^2", "x*x", "x x", "x(", "x*("], "showStrings": false, "partialCredit": 0, "message": ""}, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "[solmin[1],solmax[1]]", "allowFractions": true, "correctAnswerFractions": true, "isSet": false}}], "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": "

Factorise $\\simplify{{a[2]*c[2]}x^2+{a[2]*d[2]+b[2]*c[2]}x+ {b[2]*d[2]}}=$ [[0]]

\n

Hence solve $\\simplify{{a[2]*c[2]}x^2+{a[2]*d[2]+b[2]*c[2]}x+ {b[2]*d[2]}}=0$.

\n

[[1]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({a[2]}x+{b[2]})({c[2]}x+{d[2]})", "answerSimplification": "std", "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": [")("], "showStrings": false, "partialCredit": 0, "message": ""}, "notallowed": {"strings": ["x^2", "x*x", "x x", "x(", "x*("], "showStrings": false, "partialCredit": 0, "message": ""}, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "[solmin[2],solmax[2]]", "allowFractions": true, "correctAnswerFractions": true, "isSet": false}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Ugur's copy of Factorising Quadratic Equations with $x^2$ Coefficients of 1", "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": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Factorise three quadratic equations of the form $x^2+bx+c$.

\n

The first has two negative roots, the second has one negative and one positive, and the third is the difference of two squares.

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

Factorise the following quadratic equations.

\n

", "advice": "

Quadratic equations of the form

\n

\\[x^2+bx+c=0\\]

\n

can be factorised to create an equation of the form

\n

\\[(x+m)(x+n)=0\\text{.}\\]

\n

When we expand a factorised quadratic expression we obtain

\n

\\[(x+m)(x+n)=x^2+(m+n)x+(m \\times n)\\text{.}\\]

\n

To factorise an equation of the form $x^2+bx+c$, we need to find two numbers which add together to make $b$, and multiply together to make $c$.

\n

a)

\n

\\[\\simplify{x^2+{v1+v2}x+{v1*v2}=0}\\]

\n

We need to find two values that add together to make $\\var{v1+v2}$ and multiply together to make $\\var{v1*v2}$.

\n

\\[\\begin{align}
\\var{v1} \\times \\var{v2}&=\\var{v1*v2}\\\\
\\var{v1}+\\var{v2}&=\\var{v1+v2}\\\\
\\end{align} \\]

\n

So the factorised form of the equation is

\n

\\[\\simplify{(x+{v1})(x+{v2})}=0\\text{.}\\]

\n

\n

b)

\n

We can begin factorising by finding factors of $\\var{v3*v4}$ that add together to give $\\var{v3+v4}$.

\n

\\[\\begin{align}
\\var{v3} \\times \\var{v4}&=\\var{v3*v4}\\\\
\\var{v3}+\\var{v4}&=\\var{v3+v4}\\\\
\\end{align} \\]

\n

So the factorised form of the equation is

\n

\\[\\simplify{(x+{v3})(x+{v4})}=0\\text{.}\\]

\n

c)

\n

When factorising the quadratic expression

\n

\\[\\simplify{x^2+{v5*v6}=0}\\]

\n

we need to find two values that add together to make $0$ and multiply together to make $\\var{v5*v6}$.

\n

\\begin{align}
\\var{v5} \\times \\var{v6}& = \\var{v5*v6}\\\\
\\simplify[]{ {v5} + {v6}} &= 0 \\\\
\\end{align}

\n

So the factorised form of the equation is

\n

\\[\\simplify{(x+{v5})(x+{v6})}=0\\text{.}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"v1": {"name": "v1", "group": "Part A ", "definition": "random(1..10)", "description": "", "templateType": "anything", "can_override": false}, "v2": {"name": "v2", "group": "Part A ", "definition": "random(2..6 except v1)", "description": "", "templateType": "anything", "can_override": false}, "v4": {"name": "v4", "group": "Part A ", "definition": "random(1..10 except -v3)", "description": "", "templateType": "anything", "can_override": false}, "v5": {"name": "v5", "group": "Part A ", "definition": "random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "v3": {"name": "v3", "group": "Part A ", "definition": "random(-8..-1)", "description": "", "templateType": "anything", "can_override": false}, "v6": {"name": "v6", "group": "Part A ", "definition": "-v5", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Part A ", "variables": ["v1", "v2", "v3", "v4", "v5", "v6"]}], "functions": {}, "preamble": {"js": "question.is_factorised = function(part,penalty) {\n penalty = penalty || 0;\n if(part.credit>0) {\n // Parse the student's answer as a syntax tree\n var studentTree = Numbas.jme.compile(part.studentAnswer,Numbas.jme.builtinScope);\n\n // Create the pattern to match against \n // we just want two sets of brackets, each containing two terms\n // or one of the brackets might not have a constant term\n // or for repeated roots, you might write (x+a)^2\n var rule = Numbas.jme.compile('m_all(m_any(x,x+m_pm(m_number),x^m_number,(x+m_pm(m_number))^m_number))*m_nothing');\n\n // Check the student's answer matches the pattern. \n var m = Numbas.jme.display.matchTree(rule,studentTree,true);\n // If not, take away marks\n if(!m) {\n part.multCredit(penalty,'Your answer is not fully factorised.');\n }\n }\n}", "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{x^2+{v1+v2}x+{v1*v2}=0}$

\n

[[0]] $=0$

\n

", "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": "(x+{v1})(x+{v2})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "(`+-x^$n`? + `+- $n)`* * $z", "partialCredit": 0, "message": "Your answer is not fully factorised.", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "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": "

$\\simplify{x^2+{v3+v4}x+{v3*v4}}=0$

\n

[[0]] $=0$

\n

", "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": "(x+{v3})(x+{v4})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "(`+-x^$n`? + `+- $n)`* * $z", "partialCredit": 0, "message": "Your answer is not fully factorised.", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "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": "

$\\simplify{x^2+{v5*v6}}=0$

\n

[[0]] $=0$

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(x+{v5})(x+{v6})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "(`+-x^$n`? + `+- $n)`* * $z", "partialCredit": 0, "message": "
Your answer is not fully factorised.
", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Ugur's copy of Using the Quadratic Formula to Solve Equations of the Form $ax^2 +bx+c=0$", "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": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Apply the quadratic formula to find the roots of a given equation. The quadratic formula is given in the steps if the student requires it.

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

Use the quadratic formula to calculate values for $x$ in these equations. Input the possible values as $x_1$ and $x_2$, where $x_1<x_2$.

\n

\n

Round your answers to two decimals. E.g. if you found 4.1567, round it up to 4.16; and if you found 6.653 round it down to 6.65.

", "advice": "

The quadratic formula is 

\n

\\[x={\\frac {-b\\pm\\sqrt{b^2-4\\times a\\times c}}{2a}}\\text{.}\\]

\n

a)

\n

From the equation, we can read off values for $a$, $b$ and $c$:

\n

\\[\\begin{align}
a&=1\\text{,}\\\\
b&=\\var{a+m}\\text{,}\\\\
c&=\\var{a*m} \\text{.}
\\end{align}\\]

\n

Substituting these values into the quadratic formula,

\n

\\[x = \\frac {-\\var{a+m}\\pm\\sqrt{\\var{a+m}^2-4\\times \\var{a*m}}}{2}\\text{.}\\]

\n

Note the $\\pm$ symbol in the formula. This means there are two solutions: one using $+$, the other using $-$.

\n

The two solutions are

\n

\\[\\begin{align}
x_1&=\\var{m}\\text{,}\\\\
x_2&=\\var{a}\\text{.}
\\end{align}\\]

\n

b)

\n

Note that the right-hand side of the given equation is not zero. We need to rewrite it in the form $ax^2+bx+c=0$:

\n

\\[\\begin{align}
\\simplify{{a1}x^2+{a2}x+{a3}}&=\\var{a4}\\\\
\\simplify{{a1}x^2+{a2}x+{a3-a4}}&=0\\text{.}
\\end{align}\\]

\n

Then we can read off values for $a$, $b$ and $c$:

\n

\\[\\begin{align}
a&=\\var{a1}\\\\
b&=\\var{a2}\\\\
c&=\\var{a3-a4} \\text{.}
\\end{align}\\]

\n

We can now substitute these values into the quadratic formula:

\n

\\[x = {\\frac {-\\var{a2}\\pm\\sqrt{\\var{a2}^2-4\\times \\var{a1}\\times \\var{a3-a4}}}{2\\times\\var{a1}}}\\text{.}\\]

\n

So the two solutions are

\n

\\[\\begin{align}
x_1&=\\var{dpformat(x1,2)}\\\\
x_2&=\\var{dpformat(x2,2)}\\text{.}
\\end{align}\\]

\n

c)

\n

We first rearrange our equation into the form $ax^2+bx+c=0$:

\n

\\[\\begin{align}
\\simplify{{b1}x^2+{b2}x+{b3}}&=0=\\var{b4}x\\\\
\\simplify{{b1}x^2+{b2-b4}x+{b3}}&=0\\text{.}
\\end{align}\\]

\n

We can then read off the values for $a, b$ and $c$, which are

\n

\\[\\begin{align}
a&=\\var{b1}\\text{,}\\\\
b&=\\var{b2-b4}\\text{,}\\\\
c&=\\var{b3}\\text{.}
\\end{align}\\]

\n

Substituting these values into the quadratic formula,

\n

\\[x = {\\frac {-\\var{b2-b4}\\pm\\sqrt{\\var{b2-b4}^2-4\\times \\var{b1}\\times \\var{b3}}}{2\\times\\var{b1}}},\\]

\n

we obtain solutions

\n

\\[\\begin{align}
x_1&=\\var{dpformat(p1,2)}\\text{,}\\\\
x_2&=\\var{dpformat(p2,2)}\\text{.}
\\end{align}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a3": {"name": "a3", "group": "Ungrouped variables", "definition": "random(-30..4 except 0)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(15..20)", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(9..a-1)", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(2..10 except a1)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "part 2", "definition": "random(-10..4 except 0)^2", "description": "", "templateType": "anything", "can_override": false}, "b4": {"name": "b4", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "", "templateType": "anything", "can_override": false}, "p2": {"name": "p2", "group": "Ungrouped variables", "definition": "(-(b2-b4)+((b2-b4)^2-4*b1*b3)^(1/2))/(2*b1)", "description": "", "templateType": "anything", "can_override": false}, "b3": {"name": "b3", "group": "Ungrouped variables", "definition": "random(-30..6 except a3)", "description": "", "templateType": "anything", "can_override": false}, "a4": {"name": "a4", "group": "Ungrouped variables", "definition": "random(1..15)", "description": "", "templateType": "anything", "can_override": false}, "x1": {"name": "x1", "group": "Ungrouped variables", "definition": "(-(a2)-((a2)^2-4*a1*(a3-a4))^(1/2))/(2*a1)", "description": "", "templateType": "anything", "can_override": false}, "p1": {"name": "p1", "group": "Ungrouped variables", "definition": "(-(b2-b4)-((b2-b4)^2-4*b1*b3)^(1/2))/(2*b1)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "part 2", "definition": "2c^0.5+a1^2", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(20..35 except a2)", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(9..30 except a1)", "description": "", "templateType": "anything", "can_override": false}, "x2": {"name": "x2", "group": "Ungrouped variables", "definition": "(-(a2)+((a2)^2-4*a1*(a3-a4))^(1/2))/(2*a1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a1", "a2", "a3", "a4", "b1", "b2", "b3", "b4", "x1", "p1", "p2", "x2", "a", "m"], "variable_groups": [{"name": "part 2", "variables": ["b", "c"]}], "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{x^2+{a+m}x+{a*m}=0}$

\n

$x_1=$ [[0]]

\n

$x_2=$ [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-a", "maxValue": "-a", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-m", "maxValue": "-m", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": 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": "

$\\simplify{{a1}x^2+{a2}x+{a3}={a4}}$

\n

$x_1=$ [[0]]

\n

$x_2=$ [[1]]

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "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": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "x2", "maxValue": "x2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": 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": "

$\\simplify{{b1}x^2+{b2}x+{b3}={b4}x}$

\n

$x_1=$ [[0]]

\n

$x_2=$ [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "p1", "maxValue": "p1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "p2", "maxValue": "p2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Ugur's copy of Laws of Indices", "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": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

This question aims to test understanding and ability to use the laws of indices.

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

Using the laws of indices, simplify each expression down to its simplest form. Recall that $a^{0} = 1$ for any number $a$.

", "advice": "

a)

\n

Here we are using the rule of indices: $a^m \\times a^n = a^{m+n}$.

\n

Using this rule, 

\n

\\[
\\begin{align}
a^\\var{x} \\times a^\\var{y}\\ &= a^\\simplify[all, !collectNumbers]{{x}+{y}}\\\\
&= a^\\var{x+y}.
\\end{align}
\\]

\n

b)

\n

We are asked to find $\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q}$.

\n

Notice there is a constant in front of each of the terms.

\n

To do this, write the product out explicitly, as

\n

\\[\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q} = \\var{c} \\times \\var{d} \\times a^\\var{p} \\times a^\\var{q}.\\]

\n

We know that $\\var{c} \\times \\var{d} = \\var{c*d}$, and using the rule of indices: $a^\\var{p} \\times a^\\var{q} = a^\\var{p+q}$.

\n

Therefore:

\n

\\begin{align}
\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q}&= \\var{c*d} \\times a^\\var{p+q} \\\\
&= \\simplify{{c*d}*a^{p+q}}.
\\end{align}

\n

c)

\n

Here we are using: $a^m \\div a^n = a^{m-n}$.

\n

We are asked to simplify the expression, $\\displaystyle\\simplify{{b}*a^{x}/({g}*a^{y})}$.

\n

To do this, we just have to use the previously mentioned rule of indices. We write this out explicity as

\n

\\[\\simplify{{b}*a^{x}/({g}*a^{y})} = \\simplify{{b}/{g}} \\times \\simplify{a^{x}/(a^{y})}.\\]

\n

Using rules of indices,

\n

\\begin{align}                                                                                                                                                                                                                                                                                           \\frac{a^\\var{x}}{a^\\var{y}} &= a^\\var{x} \\div a^\\var{y}\\\\
&= a^\\simplify[all, !collectNumbers]{{x}-{y}}\\\\
&= a^\\var{x-y}.
\\end{align}

\n

Therefore,

\n

\\begin{align}
\\frac{\\var{b}a^\\var{x}}{\\var{g}a^\\var{y}} &= \\simplify{{b}/{g}} \\times \\simplify{a^{{x}-{y}}}\\\\
&= \\simplify{{b}/{g}*a^{x-y}}.
\\end{align}

\n

Alternatively, 

\n

Using the rule of indices: $a^{-m}  = \\displaystyle\\frac{1}{a^{m}}$, we can rewrite the question as:

\n

\\begin{align}
\\frac{\\var{b}a^\\var{x}}{\\var{g}a^\\var{y}} &= \\simplify{{b}/{g}} \\times \\frac{a^\\var{x}}{a^\\var{y}}\\\\
&= \\simplify{{b}/{g}} \\times a^\\var{x} \\times a^{-\\var{y}}.
\\end{align}

\n

And then using the rule: $a^m \\times a^n = a^{m+n}$, this becomes:

\n

\\begin{align}
\\simplify{{b}/{g}} \\times a^\\var{x} \\times a^{-\\var{y}} &= \\simplify{{b}/{g}} \\times a^\\simplify[all,!collectNumbers]{{x}+(-{y})}\\\\
&= \\simplify{{b}/{g}*a^{x-y}}.
\\end{align}

\n

d)

\n

The question asks us to simplify $(\\simplify{{c}*a^{p}})^{\\var{q}}$.

\n

To do this we use the rules:

\n

\\[(a^{m})^{n} = a^{mn},\\]

\n

\\[(ab)^m = a^mb^m.\\]

\n

We can then expand the equation as

\n

\\[(\\simplify{{c}*a^{p}})^{\\var{q}}= \\var{c}^{\\var{q}} \\times (a^{\\var{p}})^{\\var{q}}.\\]

\n

Then using the rule of indices mentioned previously,

\n

\\[
\\begin{align}
(\\simplify{{c}*a^{p}})^{\\var{q}}&= \\simplify{{c}^{q}} \\times a^\\var{p*q}\\\\
&= \\simplify{{c}^{q}*a^{p*q}}.
\\end{align}
\\]

\n

e)

\n

The question asks us to simplify $\\sqrt[\\var{d}]{\\var{x}^\\var{d}a}$.

\n

To do this we use the rules:

\n

\\[a^\\frac{1}{m} = \\sqrt[m]{a},\\]

\n

\\[(ab)^m = a^mb^m.\\]

\n

We can expand the expression as follows:

\n

\\[
\\begin{align}
\\sqrt[\\var{d}]{a} &= (\\simplify{a})^\\frac{1}{\\var{d}}\\\\
&= a^\\frac{1}{\\var{d}}.
\\end{align}
\\]

\n

f)

\n

The question requires us to simplify $\\sqrt[\\var{c}]{a^\\var{q}}$.

\n

Here, we use the rule of indices: $a^\\frac{n}{m} = \\sqrt[m]{a^n}$, allowing us to expand the expression as follows:

\n

\\[
\\begin{align}
\\sqrt[\\var{c}]{\\simplify{a^{q}}} &= \\simplify[fractionnumbers,all]{(a^{q})^{{1}/{{c}}}}\\\\
&= \\simplify[fractionnumbers,all]{a^{{q}/{c}}}.
\\end{align}
\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"g": {"name": "g", "group": "Ungrouped variables", "definition": "random(2..9 except b)", "description": "

Used in part c

", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2,4)", "description": "

Used in parts b,d and f

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

Used in parts a,c and e

", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(3..5)", "description": "

Used in parts b and e

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

Used in parts b and d

", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(3,5)", "description": "

Used in parts b,d and f

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

Used in part c

", "templateType": "anything", "can_override": false}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "

\n

Used in parts a,c and f

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["x", "y", "c", "d", "p", "q", "b", "g"], "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": "

Write $a^{\\var{x}} \\times a^{\\var{y}}$ as a single power of $a$.

\n

\n

$a^{\\var{x}} \\times a^{\\var{y}} =$ [[0]].

", "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": "a^{x+y}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "a^?`?", "partialCredit": 0, "message": "You haven't simplified: your answer is not in the form $a^?$.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "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": "

Write $\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q}$ as an integer multiplied by a single power of $a$.

\n

$\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q} =$ [[0]].

\n

", "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": "{c*d}*a^{p+q}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "$n*a^?`?", "partialCredit": 0, "message": "You haven't simplified: your answer is not in the form $?a^?$.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "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": "

Write $\\displaystyle\\simplify{{b}*a^{x}/({g}*a^{y})}$ as a number multiplied by a single power of $a$.

\n

$\\displaystyle\\simplify{{b}*a^{x}/({g}*a^{y})} =$ [[0]].

\n

", "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": "{b}/{g}a^{x-y}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "$n/$n`? * a^?`?", "partialCredit": 0, "message": "You haven't simplified: your answer is not in the form $\\frac{?}{?} \\cdot a^?$.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "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": "

Write $(\\simplify{{c}*a^{p}})^{\\var{q}}$ as an integer multiplied by a single power of $a$.

\n

$(\\simplify{{c}*a^{p}})^{\\var{q}} =$ [[0]].

\n

", "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": "{c^{q}}*a^{p*q}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "$n`?*a^?`?", "partialCredit": 0, "message": "You must write your answer as an integer multiplied by a power of $a$.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "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": "

Write $\\sqrt[\\var{d}]{a}$ as a single power of $a$. 

\n

$\\sqrt[\\var{d}]{a} =$ [[0]].

", "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": "a^(1/{d})", "answerSimplification": "basic", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "a^?`?", "partialCredit": 0, "message": "

You must input your answer as a single power of a.

", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "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": "

Write $\\sqrt[\\var{q}]{a^\\var{c}}$ as a single power of $a$.

\n

$\\sqrt[\\var{q}]{a^\\var{c}} =$ [[0]].

", "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": "a^({c}/{q})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "a^?`?", "partialCredit": 0, "message": "

You must input your answer as a single power of a.

", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Ugur's copy of 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": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "type": "question", "statement": "

Working with numbers that are very large or very small can be tricky.

\n

Standard form allows us to simplify these numbers, using powers of 10.

\n
The standard index form can be defined as
\n
\\[A \\times 10^n,\\]
\n
where $1 ≤ A < 10$ and $n$ is an integer, e.g. $2.26 \\times 10^5$ is a standard form of a number 226000.
\n
\n

 

\n

Write the following in standard index form (for example, for $2.01\\times 10^5$ we would write 2.01*10^5 in the gap).

\n
", "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"int": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "int", "definition": "random(2..9)"}, "A3dp": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "A3dp", "definition": "random(1..10 #0.001)"}, "B": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "B", "definition": "repeat(random(3..9 #0.01), 4)"}, "small5": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "small5", "definition": "random(0.00001..0.0001 #0.00000001)"}, "A5dp": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "A5dp", "definition": "random(1..10 #0.00001)"}, "ran": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "ran", "definition": "random([6,7,8,9,10])"}, "A": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "A", "definition": "repeat(random(1..10 #0.01 except 10), 3)"}}, "functions": {}, "tags": ["conversion", "converting", "standard form", "standard index form", "taxonomy"], "variable_groups": [], "parts": [{"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "showpreview": true, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "answersimplification": "!collectnumbers", "checkingaccuracy": 0.001, "expectedvariablenames": [], "marks": "1", "notallowed": {"message": "", "partialCredit": 0, "showStrings": false, "strings": ["^-2", "^(-2)"]}, "vsetrange": [0, 1], "musthave": {"message": "", "partialCredit": 0, "showStrings": false, "strings": ["*10^2"]}, "variableReplacements": [], "answer": "{A[2]}*10^2", "checkvariablenames": false, "type": "jme"}], "showCorrectAnswer": true, "prompt": "

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

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "showpreview": true, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "answersimplification": "!collectnumbers", "checkingaccuracy": 0.001, "expectedvariablenames": [], "marks": "1", "notallowed": {"message": "", "partialCredit": 0, "showStrings": false, "strings": ["*10^1"]}, "vsetrange": [0, 1], "musthave": {"message": "", "partialCredit": 0, "showStrings": false, "strings": ["*10^", "-1"]}, "variableReplacements": [], "answer": "{A3dp}*10^(-1)", "checkvariablenames": false, "type": "jme"}], "showCorrectAnswer": true, "prompt": "

$\\var{A3dp*10^(-1)} = $  [[0]]

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "showpreview": true, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "answersimplification": "!collectnumbers", "checkingaccuracy": 0.001, "expectedvariablenames": [], "marks": "1", "notallowed": {"message": "", "partialCredit": 0, "showStrings": false, "strings": ["^-7", "^(-7)"]}, "vsetrange": [0, 1], "musthave": {"message": "", "partialCredit": 0, "showStrings": false, "strings": ["*10^7"]}, "variableReplacements": [], "answer": "{A5dp}*10^7", "checkvariablenames": false, "type": "jme"}], "showCorrectAnswer": true, "prompt": "

$\\var{precround(A5dp*10^7,0)} =$  [[0]]

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "showpreview": true, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "answersimplification": "!collectnumbers", "checkingaccuracy": 0.001, "expectedvariablenames": [], "marks": "1", "notallowed": {"message": "", "partialCredit": 0, "showStrings": false, "strings": ["10^5"]}, "vsetrange": [0, 1], "musthave": {"message": "", "partialCredit": 0, "showStrings": false, "strings": ["*10^", "-5"]}, "variableReplacements": [], "answer": "{{small5}*10^5}*10^(-5)", "checkvariablenames": false, "type": "jme"}], "showCorrectAnswer": true, "prompt": "

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

", "type": "gapfill"}], "ungrouped_variables": ["A3dp", "A5dp", "small5", "A", "ran", "B", "int"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

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

"}, "preamble": {"css": "", "js": ""}, "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

a)

\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

 

\n

b)

\n

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

\n

If we moved the decimal place in $\\var{A3dp}$ so it matches our original number $\\var{A3dp*10^(-1)}$, we would go 1 place to the left, so $n = -1$.

\n

 

\n

c)

\n

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

\n

If we moved the decimal place in $\\var{A5dp}$ so it matches our original number $\\var{precround(A5dp*10^7,0)}$, we would go 7 places to the right, so $n = 7$.

\n

 

\n

d)

\n

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

\n

If we moved the decimal place in $\\var{small5*10^5}$ so it matches our original number $\\var{small5}$, we would go 5 places to the left, so $n = -5$.

\n

"}, {"name": "Ugur's copy of Algebraic fractions: operations involving algebraic fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

Add, subtract, multiply and divide algebraic fractions.

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

Evaluate the following and write your answer as a single fraction. Use  / to signify a fraction or division, for example $\\frac{2a-1}{x+3}$ is written (2a-1)/(x+3). Simplify/cancel where possible.

", "advice": "

Learn from your mistakes and have another attempt by clicking on 'Try another question like this one' until you get full marks.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"primes": {"name": "primes", "group": "numerical fractions", "definition": "shuffle([2,3,5,7,11,13,17])", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "numerical fractions", "definition": "primes[0]", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "numerical fractions", "definition": "primes[3]", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "numerical fractions", "definition": "primes[2]", "description": "", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "numerical fractions", "definition": "primes[6]", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "numerical fractions", "definition": "primes[5]", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "numerical fractions", "definition": "primes[4]", "description": "", "templateType": "anything", "can_override": false}, "j": {"name": "j", "group": "numerical fractions", "definition": "random(primes except [d,g,h])", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "numerical fractions", "definition": "primes[1]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "numerical fractions", "variables": ["a", "b", "c", "d", "f", "g", "h", "j", "primes"]}], "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": "

$\\displaystyle\\frac{\\var{a}x}{\\var{b}}+\\frac{x+\\var{c}}{\\var{b}}=$ [[0]]

\n

$\\displaystyle\\frac{\\var{d}}{\\var{c}y}-\\frac{\\var{a}}{\\var{c}y}=$ [[1]]

", "stepsPenalty": "2", "steps": [{"type": "information", "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": "

Add the tops, leave the bottom the same.

\n

\n

These fractions have a common denominator (the number on the bottom). This means they are out of the same number of parts and can be compared easily, for example, it is clear $\\frac{2}{3}$ is less than $\\frac{5}{3}$ but not so clear that $\\frac{3}{5}$ is less than $\\frac{2}{3}$.

\n

\n
\n

\n

Let's say you need to evaluate $\\frac{2}{3}+\\frac{5}{3}$, in words this is 'two thirds plus five thirds', so how many thirds are there in total? Seven thirds!

\n

So we have

\n

\\[\\frac{2}{3}+\\frac{5}{3}=\\frac{2+5}{3}=\\frac{7}{3}\\]

\n

The same logic is used for subtraction. Suppose you had seven fourths and someone borrowed three fourths, then you are left with four fourths. 

\n

That is

\n

\\[\\frac{7}{4}-\\frac{3}{4}=\\frac{7-3}{4}=\\frac{4}{4}=1\\]

\n

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({a+1}x+{c})/{b}", "answerSimplification": "simplifyFractions", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{d-a}/({c}y)", "answerSimplification": "simplifyFractions", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "y", "value": ""}]}], "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": "

$\\displaystyle\\simplify{(a+{f})/{g}+({h}a+1)/{j}}=$ [[0]]

\n

$\\displaystyle\\simplify{(b+{h})/{f}-(b+{j})/{g}}=$ [[1]]

\n

$\\displaystyle \\frac{\\var{a}}{\\var{d}r}+\\var{f}r=$ [[2]]

", "stepsPenalty": "2", "steps": [{"type": "information", "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": "

Rewrite the fractions so they have a common denominator. Then perform the addition or subtraction as required.

\n

\n
\n

\n

If your question was $\\frac{5}{4}+\\frac{3}{8}$ we could rewrite the first fraction as $\\frac{10}{8}$ (by multiplying the top and bottom by 2) and then both fractions would have a denominator of 8. At this point, we can perform the addition. Our working might look like this:

\n

\\[\\frac{5}{4}+\\frac{3}{8}=\\frac{5\\times 2}{4\\times 2}+\\frac{3}{8}=\\frac{10}{8}+\\frac{3}{8}=\\frac{13}{8}\\]

\n

\n

\n
\n

\n

Often we need to rewrite both fractions to get a common denominator, for instance, $\\frac{5}{4}-\\frac{2}{3}$. We could multiply the first fraction by 3 on the top and bottom, so that it's denominator was 12, and then multiply the second fraction by 4 on the top and bottom so that it also had a denominator of 12. Then we could perform the subtraction. Our working might look like this:

\n

\\[\\frac{5}{4}-\\frac{2}{3}=\\frac{5\\times 3}{4\\times 3}-\\frac{2\\times 4}{3\\times 4}=\\frac{15}{12}-\\frac{8}{12}=\\frac{7}{12}\\]

\n

\n

\n
\n

\n

Also, recall that whole numbers are just fractions with a denominator of 1, for example $3=\\frac{3}{1}$.

\n

\n

In general, the best denominator is the lowest common multiple (LCM) of the two denominators. 

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({j+g*h}a+{f*j+g})/{g*j}", "answerSimplification": "simplifyFractions", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "a", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({g-f}b+{g*h-f*j})/{f*g}", "answerSimplification": "simplifyFractions", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "b", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({a}+{f*d}r^2)/({d}r)", "answerSimplification": "simplifyFractions", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "r", "value": ""}]}], "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": "

$\\displaystyle\\frac{m+1}{n+1}\\times \\frac{y}{x}=$ [[0]]

\n

$\\displaystyle -\\frac{\\var{f}+w}{\\var{j}}\\times \\var{d}=$ [[1]]

\n

\n

\n

", "stepsPenalty": "2", "steps": [{"type": "information", "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": "

Multiply the tops and the bottoms.

\n

\n
\n

\n

For example 

\n

\\[\\frac{4}{5}\\times \\frac{2}{3}=\\frac{4\\times 2}{5 \\times 3}=\\frac{8}{15}\\]

\n

\n

\n
\n

\n

Also recall that whole numbers are just fractions with a denominator of 1, for example $7=\\frac{7}{1}$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "((m+1)*y)/((n+1)*x)", "answerSimplification": "simplifyFractions", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "m", "value": ""}, {"name": "n", "value": ""}, {"name": "x", "value": ""}, {"name": "y", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "-({d*f}+{d}w)/{j}", "answerSimplification": "simplifyFractions", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "w", "value": ""}]}], "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": "

$\\displaystyle{\\simplify{({f}+{a}x)^2/{h}}}\\div \\simplify{(({f}+{a}x){g})/({j}x)}=$ [[0]]

\n

$\\displaystyle \\frac{\\var{b}q}{\\var{c}q}\\div (\\var{d}+t)=$ [[1]]

\n

$\\displaystyle \\var{j}z\\div \\left(\\frac{\\var{-d}(z+1)^2}{\\var{f}z}\\right)=$ [[2]]

\n

", "stepsPenalty": "2", "steps": [{"type": "information", "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": "

Flip the second fraction and then multiply.

\n

\n
\n

\n

Flipping a fraction is also known as taking the reciprocal of the fraction (or inverting a fraction). Note that a whole number is also a fraction with a denominator of 1, for example, $6=\\frac{6}{1}$.

\n

How do you find half of a number? You could 'divide it by 2', or you could 'multiply by $\\frac{1}{2}$. Notice that $\\frac{1}{2}$ is the reciprocal of 2. When we divide by a number this is actually the same as multiplying by its reciprocal.

\n

\n
\n

\n

Suppose you need to evaluate $\\frac{3}{7}\\div\\frac{5}{4}$. Recall this is the same as asking 'how many $\\frac{5}{4}$s are in $\\frac{3}{7}$?', but that doesn't seem to be very helpful here! What is helpful is realising that dividing by $\\frac{5}{4}$ is the same as multiplying by $\\frac{4}{5}$. Our working could look like this

\n

\\[\\frac{3}{7}\\div\\frac{5}{4}=\\frac{3}{7}\\times\\frac{4}{5}=\\frac{3\\times 4}{7\\times 5}=\\frac{12}{35}\\]

\n

 

"}], "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": "({a*j}x^2+{j*f}x)/{g*h}", "answerSimplification": "simplifyFractions", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"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": "{b}/({c}({d}+t))", "answerSimplification": "simplifyFractions", "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": "t", "value": ""}]}, {"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": "({j*f}z^2)/({-d}(z+1)^2)", "answerSimplification": "simplifyFractions", "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": "z", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Ugur's copy of Algebra VI: Rearranging equations to find the value of unknown variable", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Nasir Firoz Khan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/909/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "tags": [], "metadata": {"description": "

This exercise will help you rearrange a linear equation to find the value of a given variable

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

Rearrange the following equations to solve for $y$. Enter your answers as a fraction a/b.

", "advice": "

Use the following steps in both parts to solve for unknown:

\n

Part a)

\n

1. Bring the terms of given variable to one side by changing signs.

\n

Ex-  $\\var{a}y - \\var{c}y$ =  $\\var{h}y$

\n

2. Take all the constants to one side by changing signs

\n

Ex- $\\var{b}- \\var{d}$ =  $\\var{w}$

\n

3. Solving for y, we get-

\n

$\\ y $=  $\\var{f}$

\n

\n

Part b)

\n

1. Bring the terms of fractions of variables  to one side by changing signs.

\n

Ex-  $\\frac{\\var{m}}{{y}} - \\frac{\\var{s}}{{y}} =  \\frac{\\var{o}}{{y}}$

\n

2. Take all the constants to one side by changing signs

\n

Ex- $\\var{t}- \\var{n}$ =  $\\var{u}$

\n

3. Solving for y, we get-

\n

$\\ y $=  $\\var{g}$

\n

\n

For further help, check this video- 

\n

                               

", "rulesets": {"std": ["all"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(5..8)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2..4 except a)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(10..18)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Ungrouped variables", "definition": "precround((o/u),2)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "precround((w/h),2)", "description": "", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Ungrouped variables", "definition": "a-c", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(2..12)", "description": "", "templateType": "anything", "can_override": false}, "o": {"name": "o", "group": "Ungrouped variables", "definition": "m-s", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..12)", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(2..12)", "description": "", "templateType": "anything", "can_override": false}, "u": {"name": "u", "group": "Ungrouped variables", "definition": "t-n", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "random(2..12 except n)", "description": "", "templateType": "anything", "can_override": false}, "w": {"name": "w", "group": "Ungrouped variables", "definition": "b-d", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "c", "b", "d", "m", "n", "s", "t", "f", "g", "w", "h", "u", "o"], "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}y + \\var{d} = \\var{b} +\\var{c}y$

\n

$y=\\;$[[0]]

\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": "{b-d}/{a-c}", "maxValue": "{b-d}/{a-c}", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": false, "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": "

$\\displaystyle \\frac{\\var{m}}{y}+\\var{n}=\\frac{\\var{s}}{y}+\\var{t}$

\n

$y=\\;$[[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": "{m-s}/{t-n}", "maxValue": "{m-s}/{t-n}", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": false, "reverse": true, "browse": true, "allowsteps": false, "showfrontpage": true, "showresultspage": "review", "navigatemode": "sequence", "onleave": {"action": "none", "message": "

There are unattempted parts in the question, are you sure you want to leave

"}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": false, "timeout": {"action": "warn", "message": "

YOU HAVE RUN OUT OF TIME

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

LAST 5 MINUTES

"}}, "feedback": {"showactualmark": false, "showtotalmark": true, "showanswerstate": false, "allowrevealanswer": false, "advicethreshold": 0, "intro": "", "reviewshowscore": true, "reviewshowfeedback": false, "reviewshowexpectedanswer": true, "reviewshowadvice": false, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14200/"}], "extensions": [], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

\n

You can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by {settings['separator']}.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentThe separate items in the student's answer

", "definition": "let(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)"}, {"name": "expected_numbers", "description": "", "definition": "let(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)"}, {"name": "valid_numbers", "description": "

Is every number in the student's list valid?

", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "

Are the student's answers in ascending order?

", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "

Is each number in the expected answer present in the student's list the correct number of times?

", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentHas every number been included the right number of times?

", "definition": "all(included)"}, {"name": "no_extras", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "

Should the answer be considered as a set, so the number of times an element occurs doesn't matter?

", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "

Numbers included in the student's answer that are not in the expected list.

", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": []}