// Numbas version: finer_feedback_settings {"name": "Subtract two fractions with different denominators (some negative numbers)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"maxRuns": 100, "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 and (a<0 or c<0)"}, "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}}$.
\nAn example of a correct calculation would be $\\dfrac{1}{2}-\\dfrac{-3}{4}=\\frac{\\boxed{4}-\\boxed{-6}}{\\boxed{8}}=\\frac{\\boxed{10}}{\\boxed{8}}$.
\nNote 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).
", "extensions": [], "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}}}$.
", "rulesets": {"std": ["all"]}, "variable_groups": [], "metadata": {"description": "This question tests a student's ability subtract one fraction from another with different denominators (at least one of them is negative).
", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["a", "b", "c", "d"], "tags": [], "parts": [{"variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "gaps": [{"correctAnswerStyle": "plain", "allowFractions": false, "type": "numberentry", "correctAnswerFraction": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "mustBeReduced": false, "scripts": {}, "mustBeReducedPC": 0, "maxValue": "a*d", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "minValue": "a*d", "marks": 1, "notationStyles": ["plain", "en", "si-en"]}, {"correctAnswerStyle": "plain", "allowFractions": false, "type": "numberentry", "correctAnswerFraction": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "mustBeReduced": false, "scripts": {}, "mustBeReducedPC": 0, "maxValue": "b*c", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "minValue": "b*c", "marks": 1, "notationStyles": ["plain", "en", "si-en"]}, {"correctAnswerStyle": "plain", "allowFractions": false, "type": "numberentry", "correctAnswerFraction": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "mustBeReduced": false, "scripts": {}, "mustBeReducedPC": 0, "maxValue": "b*d", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "minValue": "b*d", "marks": "1", "notationStyles": ["plain", "en", "si-en"]}, {"correctAnswerStyle": "plain", "allowFractions": false, "type": "numberentry", "correctAnswerFraction": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "mustBeReduced": false, "scripts": {}, "mustBeReducedPC": 0, "maxValue": "a*d-b*c", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "minValue": "a*d-b*c", "marks": 1, "notationStyles": ["plain", "en", "si-en"]}, {"correctAnswerStyle": "plain", "allowFractions": false, "type": "numberentry", "correctAnswerFraction": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "mustBeReduced": false, "scripts": {}, "mustBeReducedPC": 0, "maxValue": "b*d", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "minValue": "b*d", "marks": 1, "notationStyles": ["plain", "en", "si-en"]}], "type": "gapfill", "prompt": "Numerator of the first fraction.
", "definition": "random(-99..99 except 0)", "name": "a", "templateType": "anything"}, "c": {"group": "Ungrouped variables", "description": "This is the numerator of the second fraction.
", "definition": "random(-99..99 except 0)", "name": "c", "templateType": "anything"}, "d": {"group": "Ungrouped variables", "description": "This is the denominator of the second fraction.
", "definition": "random(2..99)", "name": "d", "templateType": "anything"}, "b": {"group": "Ungrouped variables", "description": "This is the denominator of the first fraction.
", "definition": "random(2..99)", "name": "b", "templateType": "anything"}}, "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/"}]}