// Numbas version: exam_results_page_options {"name": "HELM Book 1.4.3 Exercises", "metadata": {"description": "

HELM Book 1.4.3 Exercises: addition and subtraction of algebraic fractions

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], [], []], "questions": [{"name": "1.4.3.1 Add two algebraic fractions version 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Simplify ax/b +/- cx/d, where x is a randomised variable, and a,b,c,d are randomised integers.

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

Simplify, if possible, $\\displaystyle{\\var{te[0]}\\var{sgnl}\\var{te[1]}}$

", "advice": "

Given $\\displaystyle{\\var{te[0]}\\var{sgnl}\\var{te[1]}}$

\n

$\\displaystyle{\\var{te[0]}}$ can be simplified to $\\displaystyle{\\var{te_red[0]}}$

\n

$\\displaystyle{\\var{te[1]}}$ can be simplified to $\\displaystyle{\\var{te_red[1]}}$

\n

so $\\displaystyle{\\var{te[0]}\\var{sgnl}\\var{te[1]} = \\var{te_red[0]} \\var{sgnl} \\var{te_red[1]}}$

\n

The terms have a common factor of $\\var{ve}$.

\n

So $\\displaystyle{\\var{te_red[0]}\\var{sgnl}\\var{te_red[1]} = \\var{ve}\\left(\\var{fre[0]}\\var{sgnl}\\var{fre[1]} \\right)  }$

\n

The lowest common multiple of $\\var{den_red[0]}$ and $\\var{den_red[1]}$ is $\\var{lcm}$.

\n

So: \\[\\begin{align*}\\var{te_red[0]} \\var{sgnl} \\var{te_red[1]} &= \\var{ve} \\left( \\frac{\\var{mult[0]}}{\\var{mult[0]}}\\times\\var{fre[0]} \\var{sgnl} \\frac{\\var{mult[1]}}{\\var{mult[1]}}\\times \\var{fre[1]}\\right)\\\\&=\\var{ve}\\left(\\frac{\\var{mult[0]}\\times\\var{num_red[0]} \\var{sgnl} \\var{mult[1]}\\times\\var{num_red[1]}}{\\var{lcm}}\\right)\\\\&=\\var{ans}\\end{align*}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"letter": {"name": "letter", "group": "Ungrouped variables", "definition": "random(\"a\",\"b\",\"c\",\"d\",\"f\",\"g\",\"h\",\"k\",\"m\",\"n\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\")", "description": "", "templateType": "anything", "can_override": false}, "dens": {"name": "dens", "group": "Ungrouped variables", "definition": "shuffle(4..9)", "description": "

list of possible denominators

", "templateType": "anything", "can_override": false}, "nums": {"name": "nums", "group": "Ungrouped variables", "definition": "[random(1,shuffle(1..dens[0]-1)[0]),\n random(1,shuffle(1..dens[1]-1)[0])]", "description": "

The numerators

", "templateType": "anything", "can_override": false}, "ts": {"name": "ts", "group": "Ungrouped variables", "definition": "[\"(\"+nums[0]+\"*\"+letter+\")/\"+dens[0],\n \"(\"+nums[1]+\"*\"+letter+\")/\"+dens[1]\n ]", "description": "", "templateType": "anything", "can_override": false}, "te_red": {"name": "te_red", "group": "Ungrouped variables", "definition": "[simplify(expression(ts[0]),\"all\"),simplify(expression(ts[1]),\"all\")]", "description": "

The two tems as reduced expressions. Used in the advice.

", "templateType": "anything", "can_override": false}, "te": {"name": "te", "group": "Ungrouped variables", "definition": "[simplify(expression(ts[0]),[\"basic\",\"unitFactor\"]),\n simplify(expression(ts[1]),[\"basic\",\"unitFactor\"])]", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "simplify(expression(letter+\"*\"+(frsum)),\"all\")", "description": "

the final answer

", "templateType": "anything", "can_override": false}, "fr": {"name": "fr", "group": "Ungrouped variables", "definition": "[rational(nums[0]/dens[0]),\n rational(nums[1]/dens[1])\n ]", "description": "

The fractions without the variable

", "templateType": "anything", "can_override": false}, "lcm": {"name": "lcm", "group": "Ungrouped variables", "definition": "den_red[0]*den_red[1]/gcd(den_red[0],den_red[1])", "description": "

lowest common multiple of the reduced denominators

", "templateType": "anything", "can_override": false}, "mult": {"name": "mult", "group": "Ungrouped variables", "definition": "[lcm/den_red[0],lcm/den_red[1]]", "description": "

What each term needs to be multipled by to put it over a common fraction. Used in the advice display.

", "templateType": "anything", "can_override": false}, "den_red": {"name": "den_red", "group": "Ungrouped variables", "definition": "[int(decimal(split(string(fr[0]),\"/\")[1])),\n int(decimal(split(string(fr[1]),\"/\")[1]))\n ]", "description": "

the denominators of the reduced fractions

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

for display in the advice

", "templateType": "anything", "can_override": false}, "fre": {"name": "fre", "group": "Ungrouped variables", "definition": "[expression(string(fr[0])),\n expression(string(fr[1]))]", "description": "

the fractions as strings, for display

", "templateType": "anything", "can_override": false}, "sgn": {"name": "sgn", "group": "Ungrouped variables", "definition": "random(\"+\",\"-\")", "description": "", "templateType": "anything", "can_override": false}, "sgnl": {"name": "sgnl", "group": "Ungrouped variables", "definition": "latex(sgn)", "description": "

display version of the sign.

", "templateType": "anything", "can_override": false}, "frsum": {"name": "frsum", "group": "Ungrouped variables", "definition": "eval(expression(fr[0] + sgn + fr[1]))", "description": "", "templateType": "anything", "can_override": false}, "num_red": {"name": "num_red", "group": "Ungrouped variables", "definition": "[int(decimal(split(string(fr[0]),\"/\")[0])),\n int(decimal(split(string(fr[1]),\"/\")[0]))\n ]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["letter", "dens", "den_red", "nums", "num_red", "ts", "fr", "frsum", "te", "te_red", "ans", "lcm", "mult", "ve", "fre", "sgn", "sgnl"], "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, "answer": "{ans}", "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`?*$v/$n`? `| -$v/$n`?", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.4.3.2 Adding two algebraic fractions version 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Simplify (qx+a)/(rx+b) +/- (sx+c)/(tx+d)

\n

x is a randomised variable. a,b,c,d,q,r,s,t are randomised integers. a,b,c,d run from -5 to 5, including 0. q,r,s,t run from -3 to 3, and can be 0 if the constant term is nonzero, but are mostly 1.

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

Express $\\displaystyle{\\var{te[0]}\\var{sgnl}\\var{te[1]}}$ as a single fraction.

", "advice": "

\\[\\begin{align*} \\var{te[0]}\\var{sgnl}\\var{te[1]} &= \\frac{\\var{ndnde[3]}}{\\var{ndnde[3]}}\\times\\var{te[0]}\\var{sgnl}\\frac{\\var{ndnde[1]}}{\\var{ndnde[1]}}\\times\\var{te[1]}\\\\&=\\frac{\\var{cnd[0]}\\var{sgnl}\\var{cnd[1]}}{(\\var{ndnde[1]})(\\var{ndnde[3]})}\\\\&=\\frac{(\\var{cnd[2]})\\var{sgnl}(\\var{cnd[3]})}{(\\var{ndnde[1]})(\\var{ndnde[3]})}\\\\&=\\frac{\\var{cnd[4]}}{(\\var{ndnde[1]})(\\var{ndnde[3]})}\\\\&=\\var{ans} \\end{align*}\\]

\n

There is no benefit in expanding the denominator. In fact, it is best to leave the denominator factorised, because then it is easier to see if the fraction can be simplified.

\n

The next step after this would be to try to factorise the numerator, and then see if the fraction can be simplified.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"te": {"name": "te", "group": "Ungrouped variables", "definition": "[simplify(expression(\"(\"+ndnd[0]+\")/(\"+ndnd[1]+\")\"),\"all\"),\n simplify(expression(\"(\"+ndnd[2]+\")/(\"+ndnd[3]+\")\"),\"all\")\n]", "description": "", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "random(\"a\",\"b\",\"c\",\"d\",\"f\",\"g\",\"h\",\"k\",\"m\",\"n\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\")", "description": "

the variable to use

", "templateType": "anything", "can_override": false}, "xc": {"name": "xc", "group": "Ungrouped variables", "definition": "repeat(weighted_random([ [1,0.7] , [random(0..3),0.3] ])\n ,4)", "description": "

the x-coefficients

", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "map(\nswitch(xc[i]=0, random(2..5),\n xc[i]=1, random(-5..5),\n xc[i]=2, random(-5..5 except [-4,-2,2,4]),\n random(-5..5 except [-xc[i],xc[i]])\n),i,[0,1,2,3])", "description": "

the constants. Make sure that the constants are coprime with their x-coefficient, and if their x-coefficient is 0, that they are positive. There is a condition in variable testing to ensure that no fraction = 1.

", "templateType": "anything", "can_override": false}, "ndnd": {"name": "ndnd", "group": "Ungrouped variables", "definition": "[xc[0]+\"*\"+v+\"+\"+c[0],\n xc[1]+\"*\"+v+\"+\"+c[1],\n xc[2]+\"*\"+v+\"+\"+c[2],\n xc[3]+\"*\"+v+\"+\"+c[3]\n ]", "description": "

numerator 1, denominator 1, numerator 2, denominator 2, as strings.

", "templateType": "anything", "can_override": false}, "sgn": {"name": "sgn", "group": "Ungrouped variables", "definition": "random(\"+\",\"-\")", "description": "", "templateType": "anything", "can_override": false}, "sgnl": {"name": "sgnl", "group": "Ungrouped variables", "definition": "latex(sgn)", "description": "

for display purposes

", "templateType": "anything", "can_override": false}, "ndnde": {"name": "ndnde", "group": "Ungrouped variables", "definition": "map(simplify(expression(x),\"all\"),x,ndnd)", "description": "", "templateType": "anything", "can_override": false}, "cnd": {"name": "cnd", "group": "Ungrouped variables", "definition": "[simplify(expression(\"(\"+ndnd[3]+\")*(\"+ndnd[0]+\")\"),\"all\"),\nsimplify(expression(\"(\"+ndnd[1]+\")*(\"+ndnd[2]+\")\"),\"all\"),\nsimplify(expression(\"(\"+ndnd[3]+\")*(\"+ndnd[0]+\")\"),[\"expandBrackets\",\"all\"]),\nsimplify(expression(\"(\"+ndnd[1]+\")*(\"+ndnd[2]+\")\"),[\"expandBrackets\",\"all\"]),\nsimplify(expression(\n string(simplify(\n expression(\"(\"+ndnd[3]+\")*(\"+ndnd[0]+\")\"),\n [\"expandBrackets\",\"all\",\"!noLeadingMinus\"])\n )+\"+\"+\n string(simplify(\n expression(sgn+\"(\"+ndnd[1]+\")*(\"+ndnd[2]+\")\"),\n [\"expandBrackets\",\"all\",\"!noLeadingMinus\"])\n )\n),[\"expandBrackets\",\"basic\"]),\n \nsimplify(expression(\n string(simplify(expression(\"(\"+ndnd[3]+\")*(\"+ndnd[0]+\")\"),\n [\"expandBrackets\",\"all\",\"!noLeadingMinus\"]))+ \"+\" +\n string(simplify(expression(sgn+\"(\"+ndnd[1]+\")*(\"+ndnd[2]+\")\"),\n [\"expandBrackets\",\"all\",\"!noLeadingMinus\"]))\n ),[\"all\",\"!noLeadingMinus\"])\n ]", "description": "

The combined numerator and denominator terms:

\n

0) numerator term 1, 1) numerator term 2,

\n

2) brackets expanded num t1, 3) brackets expanded num t2

\n

4) numerator, no brackets

\n

5) numerator simplified

\n

", "templateType": "anything", "can_override": false}, "ansnum": {"name": "ansnum", "group": "Ungrouped variables", "definition": "simplify(expression(\n string(simplify(expression(\"(\"+ndnd[3]+\")*(\"+ndnd[0]+\")\"),\n [\"expandBrackets\",\"all\",\"!noLeadingMinus\"]))+ \"+\" +\n string(simplify(expression(sgn+\"(\"+ndnd[1]+\")*(\"+ndnd[2]+\")\"),\n [\"expandBrackets\",\"all\",\"!noLeadingMinus\"]))\n ),[\"all\",\"!noLeadingMinus\"])", "description": "", "templateType": "anything", "can_override": false}, "ansden": {"name": "ansden", "group": "Ungrouped variables", "definition": "simplify(expression(\"(\"+ndnd[1]+\")*(\"+ndnd[3]+\")\"),\"all\")", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "expression(\"(\"+string(ansnum)+\")/(\"+string(ansden)+\")\")", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "(xc[0]<>xc[1] or c[0]<>c[1]) and (xc[2]<>xc[3] or c[2]<>c[3])", "maxRuns": "76"}, "ungrouped_variables": ["v", "xc", "c", "ndnd", "te", "sgn", "sgnl", "ndnde", "cnd", "ansnum", "ansden", "ans"], "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, "answer": "{ans}", "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": "?`+/?`+", "partialCredit": 0, "message": "You need to give your answer as just one fraction", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.4.3.3 Adding two algebraic fractions version 3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Simplify (qx+a)/(rx+b) +/- (sx+c)/(rx+b)^2

\n

x is a randomised variable. a,b,c,d,q,r are randomised integers.

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

Express $\\displaystyle{\\var{te[0]}\\var{sgnl}\\var{te[1]}}$ as a single fraction.

", "advice": "

\\[\\begin{align*} \\var{te[0]}\\var{sgnl}\\var{te[1]} &= \\frac{\\var{ndnde[1]}}{\\var{ndnde[1]}}\\times\\var{te[0]}\\var{sgnl}\\var{te[1]}\\\\&=\\frac{(\\var{ndnde[1]})(\\var{ndnde[0]})\\var{sgnl}(\\var{ndnde[2]})}{\\var{ndnde[3]}}\\\\&=\\frac{(\\var{cnd[0]})\\var{sgnl}(\\var{ndnde[2]})}{\\var{ndnde[3]}}\\\\&=\\var{ans} \\end{align*}\\]

\n

There is no benefit in expanding the denominator. In fact, it is best to leave the denominator factorised, because then it is easier to see if the fraction can be simplified.

\n

The next step after this would be to try to factorise the numerator, and then see if the fraction can be simplified.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"te": {"name": "te", "group": "Ungrouped variables", "definition": "[simplify(expression(\"(\"+ndnd[0]+\")/(\"+ndnd[1]+\")\"),\"all\"),\n simplify(expression(\"(\"+ndnd[2]+\")/(\"+ndnd[3]+\")\"),\"all\")\n]", "description": "

The two terms, written as expressions

", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "random(\"a\",\"b\",\"c\",\"d\",\"f\",\"g\",\"h\",\"k\",\"m\",\"n\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\")", "description": "

the variable to use

", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random([0,0,random(1,3,5),abs(rnd[0]),abs(rnd[0]),rnd[1]],\n [1,1,random(1,3,5),rnd[0],rnd[1],rnd[2] ])", "description": "

the constants: num1 xc, num2 xc, den xc, num1 c, num2 c, den c

\n

They are set up so that the numerators are either the same constant, or expressions x+k, which are different to the denominator expressions; and, the terms in each denominator are coprime.

", "templateType": "anything", "can_override": false}, "ndnd": {"name": "ndnd", "group": "Ungrouped variables", "definition": "[c[0]+\"*\"+v+\"+\"+c[3],\n c[2]+\"*\"+v+\"+\"+c[5],\n c[1]+\"*\"+v+\"+\"+c[4],\n \"(\"+c[2]+\"*\"+v+\"+\"+c[5]+\")^2\"\n ]", "description": "

numerator 1, denominator 1, numerator 2, denominator 2, as strings.

", "templateType": "anything", "can_override": false}, "sgn": {"name": "sgn", "group": "Ungrouped variables", "definition": "random(\"+\",\"-\")", "description": "", "templateType": "anything", "can_override": false}, "sgnl": {"name": "sgnl", "group": "Ungrouped variables", "definition": "latex(sgn)", "description": "

for display purposes

", "templateType": "anything", "can_override": false}, "ndnde": {"name": "ndnde", "group": "Ungrouped variables", "definition": "map(simplify(expression(x),\"all\"),x,ndnd)", "description": "

num1,den1,num2,den2 as expressions

", "templateType": "anything", "can_override": false}, "cnd": {"name": "cnd", "group": "Ungrouped variables", "definition": "[\n simplify(expression(\n \"(\"+ndnd[1]+\")*(\"+ndnd[0]+\")\"\n ),[\"expandBrackets\",\"all\"]),\n simplify(expression(\n string(simplify(expression(\n \"(\"+ndnd[1]+\")*(\"+ndnd[0]+\")\"\n ),[\"expandBrackets\",\"all\"]))+\"+\"+\n string(simplify(expression( \n sgn+\"(\"+ndnd[2]+\")\"\n ),[\"expandBrackets\",\"all\"]))\n ),[\"all\"]) \n ]", "description": "

The combined numerator terms for display in the advice

", "templateType": "anything", "can_override": false}, "ansnum": {"name": "ansnum", "group": "Ungrouped variables", "definition": "cnd[1]", "description": "", "templateType": "anything", "can_override": false}, "ansden": {"name": "ansden", "group": "Ungrouped variables", "definition": "ndnde[3]", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "expression(\"(\"+string(ansnum)+\")/(\"+string(ansden)+\")\")", "description": "", "templateType": "anything", "can_override": false}, "rnd": {"name": "rnd", "group": "Ungrouped variables", "definition": "shuffle(-5..5 except 0)", "description": "

 list of distinct random numbers between -5 and 5

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "76"}, "ungrouped_variables": ["v", "rnd", "c", "ndnd", "ndnde", "te", "sgn", "sgnl", "cnd", "ansnum", "ansden", "ans"], "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, "answer": "{ans}", "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": "?`+/?`+", "partialCredit": 0, "message": "You need to give your answer as just one fraction", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.4.3.4 Adding two algebraic fractions version 4", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Add (a/b).x +/- (c/d) where a,b,c,d are randomised positive integers, and x is a randomised letter.

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

Express $\\displaystyle{\\var{fe[0]}\\var{ve}\\var{sgnl}\\var{fe[1]}}$ as a single fraction.

", "advice": "

$\\displaystyle{\\var{fe[0]}\\var{ve}\\var{sgnl}\\var{fe[1]}}$

\n

Consider the two denominators: $\\var{ndnd[1]}$ and $\\var{ndnd[3]}$. The greatest common divisor is $\\var{den_gcd}$ and the lowest common multiple is $\\frac{\\var{ndnd[1]}\\times\\var{ndnd[3]}}{\\var{den_gcd}}=\\var{lcm}$.

\n

\\[\\begin{align*}\\var{fe[0]}\\var{ve}\\var{sgnl}\\var{fe[1]}&=\\frac{\\var{lcm/ndnd[1]}}{\\var{lcm/ndnd[1]}}\\times\\var{fe[0]}\\var{ve}\\var{sgnl}\\var{fe[1]}\\\\&=\\frac{\\var{lcm/ndnd[1]*ndnd[0]}\\var{ve}}{\\var{lcm}} \\var{sgnl}\\var{fe[1]}\\\\&=\\frac{\\var{nexpr[1]}}{\\var{lcm}} \\end{align*}\\]

\n

\\[\\begin{align*}\\var{fe[0]}\\var{ve}\\var{sgnl}\\var{fe[1]}&=\\frac{\\var{lcm/ndnd[1]}}{\\var{lcm/ndnd[1]}}\\times\\var{fe[0]}\\var{ve}\\var{sgnl}\\frac{\\var{lcm/ndnd[3]}}{\\var{lcm/ndnd[3]}}\\times\\var{fe[1]}\\\\&=\\frac{\\var{nexpr[2]}}{\\var{lcm}}\\\\&=\\frac{\\var{nexpr[3]}}{\\var{lcm}} \\end{align*}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"sgnl": {"name": "sgnl", "group": "Ungrouped variables", "definition": "latex(sgn)", "description": "", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "random(\"a\",\"b\",\"c\",\"d\",\"f\",\"g\",\"h\",\"k\",\"m\",\"n\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\")", "description": "", "templateType": "anything", "can_override": false}, "rden": {"name": "rden", "group": "Ungrouped variables", "definition": "shuffle(2..15)[0..3]", "description": "

random numbers for the denominator

", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "[rational(rnum[0]/rden[0]),rational(rnum[1]/(rden[1]*rden[0]))]", "description": "

fraction 1 and fraction 2

", "templateType": "anything", "can_override": false}, "den_gcd": {"name": "den_gcd", "group": "Ungrouped variables", "definition": "gcd(\n ndnd[1],ndnd[3]\n )", "description": "

The GCD of the two denominators

", "templateType": "anything", "can_override": false}, "rnum": {"name": "rnum", "group": "Ungrouped variables", "definition": "[random(1..rden[0]-1),random(1..rden[1]-1)]", "description": "

random numbers for the numerator

", "templateType": "anything", "can_override": false}, "sgn": {"name": "sgn", "group": "Ungrouped variables", "definition": "random(\"+\",\"-\")", "description": "", "templateType": "anything", "can_override": false}, "fe": {"name": "fe", "group": "Ungrouped variables", "definition": "[expression(string(f[0])),expression(string(f[1]))]", "description": "

the fractions as expressions for display

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

variable as an expression

", "templateType": "anything", "can_override": false}, "lcm": {"name": "lcm", "group": "Ungrouped variables", "definition": "ndnd[3]*ndnd[1]/den_gcd", "description": "

The LCM of the two denominators

", "templateType": "anything", "can_override": false}, "ndnd": {"name": "ndnd", "group": "Ungrouped variables", "definition": "[int(decimal(split(string(f[0]),\"/\")[0])),int(decimal(split(string(f[0]),\"/\")[1])),\n int(decimal(split(string(f[1]),\"/\")[0])),int(decimal(split(string(f[1]),\"/\")[1]))]", "description": "

[0: numerator 1, 1: denominator 1, 2: numerator 2, 3: denominator 2]. Taken from variable f.

", "templateType": "anything", "can_override": false}, "nexpr": {"name": "nexpr", "group": "Ungrouped variables", "definition": "[ \n expression((lcm/ndnd[1])+\"*\"+ndnd[0]+\"*\"+v+sgnl+ndnd[2]),\n simplify(expression(\n (lcm/ndnd[1])+\"*\"+ndnd[0]+\"*\"+v+sgnl+ndnd[2]\n ),\"all\"), \n expression((lcm/ndnd[1])+\"*\"+ndnd[0]+\"*\"+v+sgnl+(lcm/ndnd[3])+\"*\"+ndnd[2]),\n simplify(expression(\n (lcm/ndnd[1])+\"*\"+ndnd[0]+\"*\"+v+sgnl+(lcm/ndnd[3])+\"*\"+ndnd[2]\n ),\"all\") \n\n\n\n] ", "description": "

expressions for the numerator

", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "if(den_gcd<>1,\n expression(\"(\"+string(nexpr[1])+\")/\"+rational(lcm)),\n expression(\"(\"+string(nexpr[3])+\")/\"+rational(lcm))\n)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["v", "ve", "rden", "rnum", "f", "sgn", "sgnl", "fe", "ndnd", "den_gcd", "lcm", "nexpr", "ans"], "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, "answer": "{ans}", "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": "?`+/?`+", "partialCredit": 0, "message": "You need to give the answer as a single fraction", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.4.3.5 Express as a single fraction version 5", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Given 2 or 3 fractions such as A/(2x+5), add them.

\n

There are 5 possible versions.

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

Express $\\displaystyle{\\var{expr}}$ as a single fraction.

", "advice": "

\\[\\var{expr}=\\var{ans}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"expr": {"name": "expr", "group": "Ungrouped variables", "definition": "[\n expression(\"A/(2x+\"+c[0]+\")+B/(x+\"+c[1]+\")\"),\n expression(\"A/(2x+\"+c[0]+\")+B/((x-\"+c[1]+\"))+C/(x-\"+c[1]+\")^2\"),\n expression(\"A/(x+\"+c[0]+\")+B/(x+\"+c[0]+\")^2\"),\n expression(\"(A*x+B)/(x^2+x+\"+c[0]+\")+C/(x-\"+c[1]+\")\"),\n expression(\"A*x+B+C/(x+\"+c[0]+\")\")\n][idx]", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "[\n expression(\"(A*(x+\"+c[1]+\")+B*(2*x+\"+c[0]+\"))/((2*x+\"+c[0]+\")*(x+\"+c[1]+\"))\"),\n expression(\"(A*(x-\"+c[1]+\")^2+B*(x-\"+c[1]+\")*(2*x+\"+c[0]+\")+C*(2*x+\"+c[0]+\"))/((2x+\"+c[0]+\")*(x-\"+c[1]+\")^2)\"),\n expression(\"(A*(x+\"+c[0]+\")+B)/(x+\"+c[0]+\")^2\"),\n expression(\"((A*x+B)*(x-\"+c[1]+\")+C*(x^2+x+\"+c[0]+\"))/((x^2+x+\"+c[0]+\")*(x-\"+c[1]+\"))\"),\n expression(\"((A*x+B)*(x+\"+c[0]+\")+C)/(x+\"+c[0]+\")\")\n][idx] ", "description": "

working out.

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

constants

", "templateType": "anything", "can_override": false}, "idx": {"name": "idx", "group": "Ungrouped variables", "definition": "random(0..4)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["c", "expr", "ans", "idx"], "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, "answer": "{ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "?`+/?`+", "partialCredit": 0, "message": "You need to express the answer as a single fraction.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.4.3.6 Adding algebraic fractions version 6", "extensions": [], "custom_part_types": [{"source": {"pk": 1, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/1/edit"}, "name": "Yes/no", "short_name": "yes-no", "description": "

The student is shown two radio choices: \"Yes\" and \"No\". One of them is correct.

", "help_url": "", "input_widget": "radios", "input_options": {"correctAnswer": "if(eval(settings[\"correct_answer_expr\"]), 0, 1)", "hint": {"static": true, "value": ""}, "choices": {"static": true, "value": ["Yes", "No"]}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nif(studentanswer=correct_answer,\n correct(),\n incorrect()\n)\n\ninterpreted_answer:\nstudentAnswer=0\n\ncorrect_answer:\nif(eval(settings[\"correct_answer_expr\"]),0,1)", "marking_notes": [{"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=correct_answer,\n correct(),\n incorrect()\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer=0"}, {"name": "correct_answer", "description": "", "definition": "if(eval(settings[\"correct_answer_expr\"]),0,1)"}], "settings": [{"name": "correct_answer_expr", "label": "Is the answer \"Yes\"?", "help_url": "", "hint": "An expression which evaluates to true or false.", "input_type": "mathematical_expression", "default_value": "true", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

This is a fixed, unmarked, question:

\n

Show that (x1)/((1/x3)-(1/x2))) = (x1x2x3)/(x2-x3)

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

Is $\\displaystyle{\\frac{x_1}{\\frac{1}{x_3}-\\frac{1}{x_2}}}$ is equal to $\\displaystyle{\\frac{x_1 x_2 x_3}{x_2-x_3}}$?

\n

Write your full working down on paper, then check it against the advice.

", "advice": "

\\[\\begin{align*}\\frac{x_1}{\\frac{1}{x_3}-\\frac{1}{x_2}} &= \\frac{x_1}{\\frac{x_2}{x_2x_3}-\\frac{x_3}{x_2 x_3}}\\\\&= \\frac{x_1}{\\frac{x_2-x_3}{x_3x_2}}\\\\&=\\frac{x_1}{1}\\times\\frac{x_2x_3}{x_2-x_3}\\\\&=\\frac{x_1x_2x_3}{x_2-x_3},\\quad\\textrm{as required.} \\end{align*}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "yes-no", "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": {"correct_answer_expr": "true"}}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.4.3.7 Adding algebraic fractions version 7", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

There are two parts: 

\n

(3x)/4-x/5+x/3 and (3x/4)-(x/5+x/3).

\n

The numbers are randomised to small, coprime, positive integers.

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

Express as a single fraction:

", "advice": "

a)

\n

\\[\\begin{align*} \\frac{\\var{n1}x}{\\var{c[0]}}-\\frac{x}{\\var{c[1]}}+\\frac{x}{\\var{c[2]}}&=\\frac{\\var{n1}x\\times\\var{c[1]}\\times\\var{c[2]}-x\\times\\var{c[0]}\\times\\var{c[2]}+x\\times\\var{c[0]}\\times\\var{c[1]}}{\\var{c[0]}\\times\\var{c[1]}\\times\\var{c[2]}}\\\\&=\\frac{\\var{n1*c[1]*c[2]}x-\\var{c[0]*c[2]}x + \\var{c[0]*c[1]}x}{\\var{c[0]*c[1]*c[2]}}\\\\&= \\var{anse[0]} \\end{align*}\\]

\n

b)

\n

\\[\\begin{align*} \\frac{\\var{n1}x}{\\var{c[0]}}-\\left(\\frac{x}{\\var{c[1]}}+\\frac{x}{\\var{c[2]}}\\right)&=\\frac{\\var{n1}x\\times\\var{c[1]}\\times\\var{c[2]}-\\left(x\\times\\var{c[0]}\\times\\var{c[2]}+x\\times\\var{c[0]}\\times\\var{c[1]}\\right)}{\\var{c[0]}\\times\\var{c[1]}\\times\\var{c[2]}}\\\\&=\\frac{\\var{n1*c[1]*c[2]}x-\\var{c[0]*c[2]}x - \\var{c[0]*c[1]}x}{\\var{c[0]*c[1]*c[2]}}\\\\&= \\var{anse[1]} \\end{align*}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "shuffle([2,3,5,7])", "description": "", "templateType": "anything", "can_override": false}, "n1": {"name": "n1", "group": "Ungrouped variables", "definition": "random(c[1],c[2],c[3])", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "[rational(n1/c[0]-1/c[1]+1/c[2]),rational(n1/c[0]-(1/c[1]+1/c[2]))]", "description": "", "templateType": "anything", "can_override": false}, "anse": {"name": "anse", "group": "Ungrouped variables", "definition": "[\n simplify(expression(string(ans[0])+\"*x\"),\"basic\"),\n simplify(expression(string(ans[1])+\"*x\"),\"basic\")\n]", "description": "

the answers as an expression

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["c", "n1", "ans", "anse"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": true, "customName": "a)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

\\[\\frac{\\var{n1}x}{\\var{c[0]}}-\\frac{x}{\\var{c[1]}}+\\frac{x}{\\var{c[2]}}\\]

", "answer": "{anse[0]}", "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": "?`+/?`+", "partialCredit": 0, "message": "You need to express your answer as a single fraction.", "nameToCompare": ""}, "valuegenerators": []}, {"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": "

\\[\\frac{\\var{n1}x}{\\var{c[0]}}-\\left(\\frac{x}{\\var{c[1]}}+\\frac{x}{\\var{c[2]}}\\right)\\]

", "answer": "{anse[1]}", "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": "?`+/?`+", "partialCredit": 0, "message": "You need to express your answer as a single fraction.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "menu", "onleave": {"action": "none", "message": ""}, "preventleave": true, "typeendtoleave": false, "startpassword": "", "allowAttemptDownload": false, "downloadEncryptionKey": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "

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

", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "extensions": [], "custom_part_types": [{"source": {"pk": 1, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/1/edit"}, "name": "Yes/no", "short_name": "yes-no", "description": "

The student is shown two radio choices: \"Yes\" and \"No\". One of them is correct.

", "help_url": "", "input_widget": "radios", "input_options": {"correctAnswer": "if(eval(settings[\"correct_answer_expr\"]), 0, 1)", "hint": {"static": true, "value": ""}, "choices": {"static": true, "value": ["Yes", "No"]}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nif(studentanswer=correct_answer,\n correct(),\n incorrect()\n)\n\ninterpreted_answer:\nstudentAnswer=0\n\ncorrect_answer:\nif(eval(settings[\"correct_answer_expr\"]),0,1)", "marking_notes": [{"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=correct_answer,\n correct(),\n incorrect()\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer=0"}, {"name": "correct_answer", "description": "", "definition": "if(eval(settings[\"correct_answer_expr\"]),0,1)"}], "settings": [{"name": "correct_answer_expr", "label": "Is the answer \"Yes\"?", "help_url": "", "hint": "An expression which evaluates to true or false.", "input_type": "mathematical_expression", "default_value": "true", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": []}