// Numbas version: exam_results_page_options {"name": "1.4.2. Task 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "1.4.2. Task 2", "tags": [], "metadata": {"description": "

Part of HELM Book 1.4.2

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

Simplify

", "advice": "

To divide we invert the second fraction and multiply:

\n

\\[\\frac{\\var{n1}}{\\var{d1}}\\div\\frac{\\var{n2}}{\\var{d2}}=\\frac{\\var{n1}}{\\var{d1}}\\times\\frac{\\var{d2}}{\\var{n2}}=\\frac{(\\var{gcd})(\\var{n[0]})(\\var{d2})}{(\\var{gcd})(\\var{n[1]})(\\var{d1})}=\\frac{\\var{nsim}}{\\var{dsim}} \\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"gcd": {"name": "gcd", "group": "q2", "definition": "random(2..10)", "description": "", "templateType": "anything", "can_override": false}, "ntmp": {"name": "ntmp", "group": "q2", "definition": "[random(1..10),random(1..10)]", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "q2", "definition": "[ntmp[0]/gcd(ntmp[0],ntmp[1]),ntmp[1]/gcd(ntmp[0],ntmp[1])]", "description": "

Two coprime numbers for the numerator values.

", "templateType": "anything", "can_override": false}, "dtmp": {"name": "dtmp", "group": "q2", "definition": "[random(1..10),random(-10..10 except 0),\n random(1..10),random(-10..10 except 0)]", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "q2", "definition": "if(dtmp[0]=dtmp[2] and dtmp[1]=dtmp[3],\n [dtmp[0]/gcd(dtmp[0],dtmp[1]),dtmp[1]/gcd(dtmp[0],dtmp[1]),\n dtmp[2]/gcd(dtmp[2],dtmp[2]),-1*dtmp[3]/gcd(dtmp[2],dtmp[3])],\n [dtmp[0]/gcd(dtmp[0],dtmp[1]),dtmp[1]/gcd(dtmp[0],dtmp[1]),\n dtmp[2]/gcd(dtmp[2],dtmp[2]),dtmp[3]/gcd(dtmp[2],dtmp[3])]\n)", "description": "

ensure that the two pairs of coefficients are not the same

\n

(d[0]x+d[1]) and (d[2]x+d[3])

", "templateType": "anything", "can_override": false}, "n1": {"name": "n1", "group": "q2", "definition": "n[0]*gcd", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "q2", "definition": "simplify(expression(d[0]+\"*x+\"+d[1]),\"all\")", "description": "", "templateType": "anything", "can_override": false}, "n2": {"name": "n2", "group": "q2", "definition": "gcd*n[1]", "description": "", "templateType": "anything", "can_override": false}, "d2": {"name": "d2", "group": "q2", "definition": "simplify(expression(d[2]+\"*x+\"+d[3]),\"all\")", "description": "", "templateType": "anything", "can_override": false}, "nsim": {"name": "nsim", "group": "q2", "definition": "simplify(expression(\n n[0]+\"*(\"+ string(d2) +\")\"\n ),\"all\")", "description": "

simplified numerator

", "templateType": "anything", "can_override": false}, "dsim": {"name": "dsim", "group": "q2", "definition": "simplify(expression(\n n[1]+\"*(\"+ string(d1) +\")\"\n ),\"all\")", "description": "

simplified denominator

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "q2", "variables": ["gcd", "ntmp", "n", "dtmp", "d", "n1", "d1", "n2", "d2", "nsim", "dsim"]}], "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": "

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\var{n1}$$\\div$$\\var{n2}$=[[0]]
$\\var{d1}$$\\var{d2}$[[1]]
\n

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "numerator", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{nsim}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "denominator", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{dsim}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}