// Numbas version: exam_results_page_options {"name": "Add two fractions with the same denominator (some negative numbers).", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {"std": ["all"]}, "metadata": {"description": "

This question tests a student's ability to add two fractions with the same denominator. There is at least one negative numerator.

", "licence": "Creative Commons Attribution 4.0 International"}, "advice": "

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

", "ungrouped_variables": ["a", "b", "d"], "preamble": {"js": "document.createElement('fraction');\ndocument.createElement('numerator');\ndocument.createElement('denominator');", "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"}, "variable_groups": [], "variablesTest": {"condition": "(a<>1 or b<>-3 or d>2) and (a<0 or b<0) and gcd(a,d)=1 and gcd(b,d)=1", "maxRuns": 100}, "name": "Add two fractions with the same denominator (some negative numbers).", "tags": [], "variables": {"d": {"description": "

The common denominator.

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

Numerator of the second fraction.

", "definition": "random(-99..99 except 0)", "name": "b", "group": "Ungrouped variables", "templateType": "anything"}, "a": {"description": "

Numerator of the first fraction.

", "definition": "random(-99..99 except 0)", "name": "a", "group": "Ungrouped variables", "templateType": "anything"}}, "functions": {}, "statement": "

Add the following fractions using the formula $\\dfrac{a}{b}+\\dfrac{c}{b}=\\frac{\\boxed{a}+\\boxed{c}}{\\boxed{b}}=\\frac{\\boxed{a+c}}{\\boxed{b}}$.

\n

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

\n

Note the final fraction should be left as it is and should not be entered in lowest form (if this is different).

", "parts": [{"variableReplacements": [], "prompt": "

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

", "variableReplacementStrategy": "originalfirst", "gaps": [{"mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "marks": 1, "allowFractions": false, "scripts": {}, "correctAnswerStyle": "plain", "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "minValue": "a", "correctAnswerFraction": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "maxValue": "a", "mustBeReduced": false, "type": "numberentry"}, {"mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "marks": 1, "allowFractions": false, "scripts": {}, "correctAnswerStyle": "plain", "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "minValue": "b", "correctAnswerFraction": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "maxValue": "b", "mustBeReduced": false, "type": "numberentry"}, {"mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "marks": 1, "allowFractions": false, "scripts": {}, "correctAnswerStyle": "plain", "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "minValue": "d", "correctAnswerFraction": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "maxValue": "d", "mustBeReduced": false, "type": "numberentry"}, {"mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "marks": 1, "allowFractions": false, "scripts": {}, "correctAnswerStyle": "plain", "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "minValue": "a+b", "correctAnswerFraction": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "maxValue": "a+b", "mustBeReduced": false, "type": "numberentry"}, {"mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "marks": 1, "allowFractions": false, "scripts": {}, "correctAnswerStyle": "plain", "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "minValue": "d", "correctAnswerFraction": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "maxValue": "d", "mustBeReduced": false, "type": "numberentry"}], "scripts": {}, "showFeedbackIcon": true, "marks": 0, "type": "gapfill", "showCorrectAnswer": true}], "extensions": [], "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/"}]}