// Numbas version: finer_feedback_settings {"name": "NG4 Subtract fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "NG4 Subtract fractions", "tags": ["adding and subtracting fractions", "adding fractions", "converting between decimals and fractions", "converting integers to fractions", "Fractions", "fractions", "integers", "manipulation of fractions", "subtracting fractions", "taxonomy"], "metadata": {"description": "
Manipulate fractions in order to add and subtract them. The difficulty escalates through the inclusion of a whole integer and a decimal, which both need to be converted into a fraction before the addition/subtraction can take place.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Evaluate the following additions and subtractions, giving each fraction in its simplest form. Write the numerator (the top number) as negative if the fraction is negative.
", "advice": "$\\displaystyle\\frac{\\var{f_coprime}}{\\var{g_coprime}}-\\frac{\\var{h_coprime}}{\\var{j_coprime}}+2.$
\n\nThe two fractions can be individually multiplied to achieve a common denominator of the lowest common multiple, $\\var{lcm2}.$
\n$\\displaystyle\\frac{\\var{f_coprime}}{\\var{g_coprime}}$ becomes $\\displaystyle\\frac{\\var{flcm2_g}}{\\var{lcm2}}$ and $\\displaystyle\\frac{\\var{h_coprime}}{\\var{j_coprime}}$ becomes $\\displaystyle\\frac{\\var{hlcm2_j}}{\\var{lcm2}}.$
\nWe can now subtract the second fraction from the first.
\n$\\displaystyle\\frac{\\var{flcm2_g}}{\\var{lcm2}}-\\frac{\\var{hlcm2_j}}{\\var{lcm2}}=\\frac{\\var{flcmhlcm}}{\\var{lcm2}}.$
\n\nFind out more about this topic using our resource.
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"hlcm2_j": {"name": "hlcm2_j", "group": "Part b", "definition": "h_coprime*lcm2_j", "description": "PART B
", "templateType": "anything", "can_override": false}, "lcm2": {"name": "lcm2", "group": "Part b", "definition": "lcm(g_coprime,j_coprime)", "description": "PART B
", "templateType": "anything", "can_override": false}, "gcd_fg": {"name": "gcd_fg", "group": "Part b", "definition": "gcd(f,g)", "description": "PART B gcd of first fraction num and denom
", "templateType": "anything", "can_override": false}, "j": {"name": "j", "group": "Part b", "definition": "random(2..10 except h)", "description": "PART B
", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Part b", "definition": "random(1..10)", "description": "PART B
", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Part b", "definition": "random(1..10)", "description": "PART B
", "templateType": "anything", "can_override": false}, "h_coprime": {"name": "h_coprime", "group": "Part b", "definition": "h/gcd_hj", "description": "PART B
", "templateType": "anything", "can_override": false}, "lcm2_j": {"name": "lcm2_j", "group": "Part b", "definition": "lcm2/j_coprime", "description": "PART B
", "templateType": "anything", "can_override": false}, "j_coprime": {"name": "j_coprime", "group": "Part b", "definition": "j/gcd_hj", "description": "PART B
", "templateType": "anything", "can_override": false}, "flcmhlcm": {"name": "flcmhlcm", "group": "Part b", "definition": "flcm2_g-hlcm2_j", "description": "PART B
", "templateType": "anything", "can_override": false}, "g_coprime": {"name": "g_coprime", "group": "Part b", "definition": "g/gcd_fg", "description": "PART B g_coprime
", "templateType": "anything", "can_override": false}, "gcd_hj": {"name": "gcd_hj", "group": "Part b", "definition": "gcd(h,j)", "description": "PART B
", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Part b", "definition": "random(2..10 except f except j)", "description": "PART B
", "templateType": "anything", "can_override": false}, "flcm2_g": {"name": "flcm2_g", "group": "Part b", "definition": "f_coprime*lcm2_g", "description": "PART B
", "templateType": "anything", "can_override": false}, "lcm2_g": {"name": "lcm2_g", "group": "Part b", "definition": "lcm2/g_coprime", "description": "PART B
", "templateType": "anything", "can_override": false}, "f_coprime": {"name": "f_coprime", "group": "Part b", "definition": "f/gcd_fg", "description": "PART B
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Part b", "variables": ["f", "f_coprime", "g", "g_coprime", "gcd_fg", "h", "h_coprime", "j", "j_coprime", "gcd_hj", "lcm2", "lcm2_g", "flcm2_g", "lcm2_j", "hlcm2_j", "flcmhlcm"]}], "functions": {}, "preamble": {"js": "", "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"}, "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": "$\\displaystyle\\frac{\\var{f_coprime}}{\\var{g_coprime}}-\\frac{\\var{h_coprime}}{\\var{j_coprime}}=$