// Numbas version: exam_results_page_options {"name": "Subtract two fractions with different denominators", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"condition": "(a<>1 or b<>2 or c<>3 or d<>4) and gcd(a,b)=1 and gcd(c,d)=1 and b<>d", "maxRuns": 100}, "variable_groups": [], "statement": "

Subtract one fraction from another using the formula $\\dfrac{a}{b}-\\dfrac{c}{d}=\\frac{\\boxed{ad}-\\boxed{bc}}{\\boxed{bd}}=\\frac{\\boxed{ad-bc}}{\\boxed{bd}}$.

\n

An example of a correct calculation would be $\\dfrac{1}{2}-\\dfrac{3}{4}=\\frac{\\boxed{4}-\\boxed{6}}{\\boxed{8}}=\\frac{\\boxed{-2}}{\\boxed{8}}$.

\n

Note that in the intermediate stage, you have to use the denominator $bd$ to be marked correct, you should not use a smaller common denominator (if one exists). Also note the final fraction should be left as it is and should not be entered in lowest form (if this is different).

", "functions": {}, "name": "Subtract two fractions with different denominators", "ungrouped_variables": ["a", "b", "c", "d"], "parts": [{"type": "gapfill", "showFeedbackIcon": true, "variableReplacements": [], "marks": 0, "prompt": "

{a}{b} $\\ -\\ $ {c}{d} $\\ =\\ $ [[0]] $\\ -\\ $ [[1]] [[2]] $\\ =\\ $ [[3]][[4]].

", "showCorrectAnswer": true, "scripts": {}, "gaps": [{"correctAnswerStyle": "plain", "showFeedbackIcon": true, "minValue": "a*d", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "maxValue": "a*d", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "type": "numberentry", "allowFractions": false, "marks": 1, "mustBeReducedPC": 0}, {"correctAnswerStyle": "plain", "showFeedbackIcon": true, "minValue": "b*c", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "maxValue": "b*c", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "type": "numberentry", "allowFractions": false, "marks": 1, "mustBeReducedPC": 0}, {"correctAnswerStyle": "plain", "showFeedbackIcon": true, "minValue": "b*d", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "maxValue": "b*d", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "type": "numberentry", "allowFractions": false, "marks": "1", "mustBeReducedPC": 0}, {"correctAnswerStyle": "plain", "showFeedbackIcon": true, "minValue": "a*d-b*c", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "maxValue": "a*d-b*c", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "type": "numberentry", "allowFractions": false, "marks": 1, "mustBeReducedPC": 0}, {"correctAnswerStyle": "plain", "showFeedbackIcon": true, "minValue": "b*d", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "maxValue": "b*d", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "type": "numberentry", "allowFractions": false, "marks": 1, "mustBeReducedPC": 0}], "variableReplacementStrategy": "originalfirst"}], "rulesets": {"std": ["all"]}, "advice": "

The correct calculation is $\\dfrac{\\var{a}}{\\var{b}}-\\dfrac{\\var{c}}{\\var{d}}=\\frac{\\boxed{\\var{a*d}}-\\boxed{\\var{b*c}}}{\\boxed{\\var{b*d}}}=\\frac{\\boxed{\\var{a*d-b*c}}}{\\boxed{\\var{b*d}}}$.

", "tags": [], "extensions": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

This question tests a student's ability to subtract one fraction from another with different denominators.

"}, "preamble": {"css": "fraction {\n display: inline-block;\n vertical-align: middle;\n}\nfraction > numerator, fraction > denominator {\n float: left;\n width: 100%;\n text-align: center;\n line-height: 2.5em;\n}\nfraction > numerator {\n border-bottom: 1px solid;\n padding-bottom: 5px;\n}\nfraction > denominator {\n padding-top: 5px;\n}\nfraction input {\n line-height: 1em;\n}\n\nfraction .part {\n margin: 0;\n}\n\n.table-responsive, .fractiontable {\n display:inline-block;\n}\n.fractiontable {\n padding: 0; \n border: 0;\n}\n\n.fractiontable .tddenom \n{\n text-align: center;\n}\n\n.fractiontable .tdnum \n{\n border-bottom: 1px solid black; \n text-align: center;\n}\n\n\n.fractiontable tr {\n height: 3em;\n}\n", "js": "document.createElement('fraction');\ndocument.createElement('numerator');\ndocument.createElement('denominator');"}, "variables": {"d": {"templateType": "anything", "definition": "random(2..99)", "description": "

This is the denominator of the second fraction.

", "name": "d", "group": "Ungrouped variables"}, "a": {"templateType": "anything", "definition": "random(1..99)", "description": "

Numerator of the first fraction.

", "name": "a", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "definition": "random(1..99)", "description": "

This is the numerator of the second fraction.

", "name": "c", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "definition": "random(2..99)", "description": "

This is the denominator of the first fraction.

", "name": "b", "group": "Ungrouped variables"}}, "type": "question", "contributors": [{"name": "Anthony Brown", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/799/"}]}]}], "contributors": [{"name": "Anthony Brown", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/799/"}]}