// Numbas version: finer_feedback_settings {"name": "My First Exam", "metadata": {"description": "
a quick test to see what the students see.
", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "duration": 0, "percentPass": "69", "showQuestionGroupNames": true, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", ""], "questions": [{"name": "Find the root(s) of a quadratic equation.", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "http://localhost:8000/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "tags": [], "metadata": {"description": "The student is asked to identify the number of roots of a quadratic equation, and then to give the root or roots. There is a hint to calculate the discriminant, and then further hints with the formula for the discriminant and the decision to make based on its value.$f(x) = \\simplify{{c1}x^2 + {c2}x + {c3}}$
", "advice": "", "rulesets": {}, "variables": {"root1": {"name": "root1", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "", "templateType": "anything"}, "root2": {"name": "root2", "group": "Ungrouped variables", "definition": "random(root1,random(-5..5 except root1))", "description": "50% chance of being the same as root1
", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random([1,1,1]+list(2..7))", "description": "", "templateType": "anything"}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "a", "description": "", "templateType": "anything"}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "a*(-root2 -root1)", "description": "", "templateType": "anything"}, "c3": {"name": "c3", "group": "Ungrouped variables", "definition": "a*root1*root2", "description": "", "templateType": "anything"}, "num_roots": {"name": "num_roots", "group": "Ungrouped variables", "definition": "if(root1=root2,1,2)", "description": "", "templateType": "anything"}, "discriminant": {"name": "discriminant", "group": "Ungrouped variables", "definition": "c2^2-4*c1*c3", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["root1", "root2", "a", "c1", "c2", "c3", "num_roots", "discriminant"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "How many roots?", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Enter the root", "rawLabel": "", "otherPart": 1, "variableReplacements": [], "availabilityCondition": "interpreted_answer=1", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}, {"label": "Enter the roots", "rawLabel": "", "otherPart": 2, "variableReplacements": [], "availabilityCondition": "interpreted_answer=2", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}, {"label": "Calculate the discriminant", "rawLabel": "", "otherPart": 3, "variableReplacements": [], "availabilityCondition": "credit<1", "penalty": "Discriminant hint", "penaltyAmount": "0.5", "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Write the number of roots", "prompt": "How many distinct solutions does $f(x)=0$ have?
", "minValue": "num_roots", "maxValue": "num_roots", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Enter the root", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "mark (Mark the student's answer):\n apply(validNumber);\n if(studentNumber in [root1,root2],\n correct(),\n incorrect(\"Your answer is not a root of the equation\")\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Identify the root(s)", "minValue": "root1", "maxValue": "root1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "gapfill", "useCustomName": true, "customName": "Enter the roots", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "distinct_roots: \n set(answers)\n\ncorrect_roots:\n filter(x in [root1,root2],x,distinct_roots)\n\nincorrect_roots:\n filter(not (x in [root1,root2]),x,distinct_roots)\n\nq1: len(correct_roots)=len(set([root1,root2]))\n\nq:\n switch(\n len(correct_roots)=len(set([root1,root2])),\n correct();\n if(len(incorrect_roots)>0,\n sub_credit(0.5,\"One of your answers is not a solution of the equation $f(x) = 0$.\")\n ),\n len(correct_roots)>0,\n if(len(incorrect_roots)>0,\n set_credit(0.5,\"One of your answers is not a solution of the equation $f(x) = 0$.\"),\n set_credit(0.5,\"You have written the same solution twice.\")\n ),\n //otherwise\n incorrect(\"Neither of your answers is a solution of the equation $f(x) = 0$.\")\n )\n\nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n apply(q)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Identify the root(s)", "prompt": "Write the two roots, $x_1$ and $x_2$, of the equation $f(x)=0$, such that $x_1 \\lt x_2$:
\n$x_1 = $ [[0]]
\n$x_2 = $ [[1]]
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "$x_1$", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Identify the root(s)", "minValue": "min(root1,root2)", "maxValue": "min(root1,root2)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "$x_2$", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Identify the root(s)", "minValue": "max(root1,root2)", "maxValue": "max(root1,root2)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": true}, {"type": "numberentry", "useCustomName": true, "customName": "Calculate the discriminant", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "See how to calculate the discriminant", "rawLabel": "See how to calculate the discriminant", "otherPart": 4, "variableReplacements": [], "availabilityCondition": "", "penalty": "Formula for the discriminant", "penaltyAmount": "0.25", "lockAfterLeaving": false}, {"label": "What to do with the discriminant", "rawLabel": "", "otherPart": 5, "variableReplacements": [], "availabilityCondition": "answered and credit=1", "penalty": "What to do with the discriminant", "penaltyAmount": "0.25", "lockAfterLeaving": false}], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": "Calculate the discriminant", "prompt": "What is the discriminant of $f(x)$?
", "minValue": "discriminant", "maxValue": "discriminant", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "information", "useCustomName": true, "customName": "Discriminant formula", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "For a quadratic equation in the form $ax^2 + bx + c$, the discriminant $D$ is
\n\\[ D = b^2-4ac \\]
"}, {"type": "information", "useCustomName": true, "customName": "What to do with the discriminant", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "The number of distinct roots of the equation depends on the value of the discriminant:
\nThe number of apartments in a housing development has been increasing by a constant amount every year. At the end of the first year, the number of apartments was {u_1}, and at the end of the {years} year, the number of apartments was {u_years}. The number of apartments, $y$, can be determined by the equation $y = mt + n$, where $t$ is the time, in years.
", "advice": "$m$ is the gradient of the line, it is also the common difference in the arithmetic sequence so you can use the formula $u_n = u_1 + (n-1)d$
\nIn this case $n =$ {n} so {u_years} = {u_1} + ({n}-1) $\\times d$
\nm = {u_years - u_1} $\\div$ {n-1}
\nm = {d}
\n$n$ represents the situation at the beginning of year 1, so is $u_1 - d$
\n$n =$ {u_1} - {d}
\n$n =$ {u_0}
\n", "rulesets": {}, "variables": {"u_1": {"name": "u_1", "group": "Ungrouped variables", "definition": "{u_0}+d", "description": "first term (houses at end of first year)
", "templateType": "anything"}, "years_eng": {"name": "years_eng", "group": "Ungrouped variables", "definition": "[ \"first\", \"second\", \"third\", \"fourth\", \"fifth\", \"sixth\", \"seventh\", \"eighth\", \"ninth\", \"tenth\" ]", "description": "conversion list for number of years to english
", "templateType": "list of strings"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(5 .. 8#1)", "description": "number of years at which second number of houses is given
", "templateType": "randrange"}, "years": {"name": "years", "group": "Ungrouped variables", "definition": "\"{years_eng[{n}-1]}\"", "description": "n converted to word
", "templateType": "string"}, "u_years": {"name": "u_years", "group": "Ungrouped variables", "definition": "{u_1}+({n}-1)*{d}", "description": "u_n number of houses after n years
", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(60 .. 110#10)", "description": "common difference to apply
", "templateType": "randrange"}, "u_0": {"name": "u_0", "group": "Ungrouped variables", "definition": "random(40 .. 120#10)", "description": "first term of sequence (houses at start of first year)
", "templateType": "randrange"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["u_1", "years_eng", "n", "years", "u_years", "d", "u_0"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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, "prompt": "Find the value of $m$.
", "minValue": "{d}", "maxValue": "{d}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en", "eu", "plain-eu"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Find the value of $n$.
", "minValue": "{u_0}", "maxValue": "{u_0}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en", "eu", "plain-eu"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Solution of Quadratic Equation", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "AJAY OTTA", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3976/"}], "tags": [], "metadata": {"description": "This is a new and easy way for solving quadratic equation. It is based on the property that the roots are equidistant from the average. ", "licence": "None specified"}, "statement": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThe quadratic equation $ax^2+bx+c=0$ can be solved in a different and easy way as follows:
\nLet $\\alpha$ and $\\beta$ be the two roots. Then we know $\\alpha\\times\\beta=\\dfrac{c}{a}$ and $\\alpha+\\beta=-\\dfrac{b}{a}$
\nWe shall use the property that the roots are equidistant from their average.
\nSo we can take them as $\\alpha=\\dfrac{1}{2}\\rm{sum}-u$ and $\\beta=\\dfrac{1}{2}\\rm{sum}+u$ Or $\\boxed{\\alpha=-\\dfrac{1}{2}\\dfrac{b}{a}-u}$ and $\\boxed{\\beta=-\\dfrac{1}{2}\\dfrac{b}{a}+u}$ .
\nConsequently we have $\\alpha\\times\\beta=\\left(-\\dfrac{1}{2}\\dfrac{b}{a}-u\\right)\\times\\left(-\\dfrac{1}{2}\\dfrac{b}{a}+u\\right)$
\n$\\implies \\dfrac{c}{a}=\\dfrac{1}{4}\\dfrac{b^2}{a^2}-u^2\\implies u^2=\\dfrac{1}{4}\\dfrac{b^2}{a^2}-\\dfrac{c}{a}$.
\nSimplifying $u^2=\\dfrac{b^2-4ac}{4a^2}\\implies \\boxed{u=\\dfrac{\\sqrt{b^2-4ac}}{2a}}$ .
\nSubstituting above we get
\n$\\alpha=\\dfrac{-b-\\sqrt{b^2-4ac}}{2a}$ and $\\beta=\\dfrac{-b+\\sqrt{b^2-4ac}}{2a}$.
\nNote : $\\boxed{\\alpha=\\rm{average}-u}$ and $\\boxed{\\beta=\\rm{average}+u}$
\n______________________________________________________________________________________________________________________________
\nLet us consider the following example:
\n$x^2-5x+6=0$ .
\nWe generally start from the product $6$ and find factors by inspection so that the sum will be $5$. In stead, in this method we start from the sum and find $u$.
\nNow sum of roots$=5\\implies \\rm{average}=\\dfrac{5}{2}$.
\nSo roots are $\\dfrac{5}{2}-u$ and $\\dfrac{5}{2}+u$ .
\nTherefore product of roots $=\\dfrac{25}{4}-u^2\\implies 6=\\dfrac{25}{4}-u^2\\implies u^2=\\dfrac{25}{4}-6\\implies u^2=\\dfrac{1}{4}\\implies u=\\pm\\dfrac{1}{2}$.
\nSo roots are $\\dfrac{5}{2}-\\dfrac{1}{2}$ and $\\dfrac{5}{2}+\\dfrac{1}{2}$ . Or roots are $2$ and $3$.
\n______________________________________________________________________________________________________________________________
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..5)*random(1,-1)", "description": "\n\n\n\n\n\nFirst coefficient
", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "a+n", "description": "\n\n\n\n\n\n\n\nrandom
", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "n", "description": "\n\n\n", "templateType": "anything", "can_override": false}, "sum": {"name": "sum", "group": "Ungrouped variables", "definition": "rational_approximation(-b/a)", "description": "\n\n\n\nSum of the roots
", "templateType": "anything", "can_override": false}, "product": {"name": "product", "group": "Ungrouped variables", "definition": "rational_approximation(c/a)\n", "description": "\n\n\n\n\nproduct of the roots
", "templateType": "anything", "can_override": false}, "u": {"name": "u", "group": "Ungrouped variables", "definition": "rational_approximation(sqrt(dis)/(2*a))\n", "description": "\n\n\n\n\n\n\n\n\n\n\n\n\n\nDistance of the root from the average
", "templateType": "anything", "can_override": false}, "avg": {"name": "avg", "group": "Ungrouped variables", "definition": "rational_approximation(sum[0]/sum[1]*0.5)", "description": "\n\n\n\n\nAverage of the roots
", "templateType": "anything", "can_override": false}, "alpha": {"name": "alpha", "group": "Ungrouped variables", "definition": "rational_approximation((avg[0]-(u[0]/u[1])*avg[1])/avg[1])", "description": "\n\n\n\n\n\n\n\n\n\nAverage-u
", "templateType": "anything", "can_override": false}, "beta": {"name": "beta", "group": "Ungrouped variables", "definition": "rational_approximation((avg[0]+(u[0]/u[1])*avg[1])/avg[1])", "description": "\n\n\nAverage+u
", "templateType": "anything", "can_override": false}, "dis": {"name": "dis", "group": "Ungrouped variables", "definition": "if(b^2-4*a*c>=0,b^2-4*a*c,\"Roots are complex\")", "description": "\n\n\n\n\nDiscriminant of the equation
", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "\nIncrement on a
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "n", "b", "c", "dis", "sum", "product", "avg", "u", "alpha", "beta"], "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": "\nFill in the gaps below.
\na=[[0]]
\nb=[[1]]
\nc=[[2]]
\nSum of roots=[[3]]
\nAvg(Average of roots)=[[4]]
\n$b^2$=[[5]]
\n$4ac$=[[6]]
\nDiscriminant $(b^2-4ac)$=[[7]]
\n$u\\left(=\\dfrac{\\sqrt{b^2-4ac}}{2a}\\right)$=[[8]]
\n$\\alpha(=Avg-u)$=[[9]]
\n$\\beta(=Avg+u)$=[[10]]
\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": "a", "maxValue": "a", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": 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": "b", "maxValue": "b", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": 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": "c", "maxValue": "c", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": 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": "sum[0]/sum[1]", "maxValue": "sum[0]/sum[1]", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": 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": "avg[0]/avg[1]", "maxValue": "avg[0]/avg[1]", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": 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": "b^2", "maxValue": "b^2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": 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": "4*a*c", "maxValue": "4*a*c", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": 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": "dis", "maxValue": "dis", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": 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": "u[0]/u[1]", "maxValue": "u[0]/u[1]", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": 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": "alpha[0]/alpha[1]", "maxValue": "alpha[0]/alpha[1]", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": 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": "beta[0]/beta[1]", "maxValue": "beta[0]/beta[1]", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Mark equations", "extensions": ["eukleides", "quantities", "random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "http://localhost:8000/accounts/profile/1/"}, {"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/"}], "tags": [], "metadata": {"description": "All the answers in this question are equations. In order to mark each\n equation, Numbas needs to pick some values that satisfy the equation \nand some that don't, and check that the student's answer agrees with the\n expected answer.
Any equation with the same solution set as the expected answer will be marked correct.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "All the answers in this question are equations. In order to mark each equation, Numbas needs to pick some values that satisfy the equation and some that don't, and check that the student's answer agrees with the expected answer.
\nAny equation with the same solution set as the expected answer will be marked correct.
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"factor": {"name": "factor", "group": "Ungrouped variables", "definition": "random(2 .. 8#1)", "description": "", "templateType": "randrange", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "factor"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$s = \\simplify[]{{factor}p}$
\nAlso try $s-\\var{factor}p=0$ and $p=s/\\var{factor}$.
", "answer": "s={factor}p", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": "10", "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "p", "value": ""}, {"name": "s", "value": "random(random(vRange),factor*p)"}]}, {"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, "prompt": "$s = \\simplify[]{{factor}p}$
\nBut this time there's a pattern-match restriction that your answer must be of the form $s = \\ldots$.
", "answer": "s={factor}p", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": "10", "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "s=?", "partialCredit": 0, "message": "Your answer must be in the form $s = f(p)$.", "nameToCompare": ""}, "valuegenerators": [{"name": "p", "value": ""}, {"name": "s", "value": "random(random(vRange),factor*p)"}]}, {"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, "prompt": "$x^2+y^2=1$
\nAlso try $1-x^2-y^2=0$ and $y=\\sqrt{1-x^2}$.
", "answer": "x^2+y^2=1", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": "10", "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": "random(random(vRange),sqrt(1-x^2))"}]}, {"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, "prompt": "$x^2 + y^2 + z^2=1$
", "answer": "x^2+y^2+z^2=1", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": "10", "vsetRange": [0, "0.5"], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}, {"name": "z", "value": "random(random(vRange),sqrt(1-x^2-y^2))"}]}, {"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, "prompt": "$x^2+y^2>1$
\nBecause this is an inequality, we need to randomly pick values either side of the critical curve, and some exactly on it.
", "answer": "x^2+y^2>1", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": "10", "vsetRange": ["-1", 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": "sqrt(1-x^2)+random(0,random(-0.001..0.001#0))"}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}], "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": [], "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "inreview"}, "type": "exam", "contributors": [{"name": "Jamie Coventry", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5099/"}], "extensions": ["eukleides", "quantities", "random_person", "stats"], "custom_part_types": [], "resources": []}