// Numbas version: finer_feedback_settings {"name": "Lois's copy of Combining fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "b", "g", "dosomething", "f", "s1", "action1", "action"], "name": "Lois's copy of Combining fractions", "tags": ["adding fractions", "combining fractions", "Fractions", "fractions", "lowest form of a fraction", "subtracting fractions", "UEL"], "preamble": {"css": "", "js": ""}, "advice": "
Recall that to add or subtract fractions you need first to find a common denominator.
\nAlgebraically the rule for {action1} fractions is \\[\\simplify{a/b+ {s1}*(c/d)=(a*d+{s1}*b*c)/(b*d)}.\\]
In this case we have:
\\[\\simplify[std,!unitFactor]{{a} / {g} + ({s1*b} / {f}) = ({a} * {f} + {g} * {s1*b}) / ({g} * {f}) ={a*f+s1*g*b}/{g*f}}.\\]
Note that this fraction is in its lowest form as there are no common factors in the denominator and the numerator.
For further help with the arithmetic of fractions see: http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-fractions-2009-1.pdf
", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"]}, "parts": [{"prompt": "\\[\\simplify[std]{{a} / {g} + ({s1*b} / {f})}\\]
Input your answer here: [[0]]
You should not give your answer as a decimal or use any brackets.
\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "You must write your answer in the form p/q for integers p and q
", "showStrings": false, "strings": ["+", ".", "(", ")", "1-", "2-", "3-", "4-", "5-", "6-", "7-", "8-", "9-"], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.0001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "musthave": {"message": "You must write your answer in the form p/q for integers p and q.
", "showStrings": false, "strings": ["/"], "partialCredit": 0}, "scripts": {}, "maxlength": {"length": 7, "message": "Your answer is too long.
", "partialCredit": 0}, "answer": "{a*f+s1*b*g}/{g*f}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme", "answersimplification": "std"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "Do the following {dosomething} and give your answer as a fraction in its lowest form.
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(1..11)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "switch(f=2,1,f=3,random(1,2),f=4,random(1,3),f=5, random(1..4),f=6,random(1,5),f=7,random(1..6),f=8,random(1,3,5,7),f=9,random(1,2,4,5,7,8),f=10,random(1,3,7,9),f=11,random(1..10))", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "g": {"definition": "switch(a=1, random(2..11),a=2,random(3..11#2),a=3,random(4,5,7,8,10,11),a=4,random(5,7,9,11),a=5, random(6,7,8,9,11),a=6,random(7,11),a=7,random(8,9,10,11),a=8,random(9,11),a=9,random(10,11),a=10,11,a=11,12)", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}, "dosomething": {"definition": "if(s1<0,'subtraction', 'addition')", "templateType": "anything", "group": "Ungrouped variables", "name": "dosomething", "description": ""}, "f": {"definition": "switch(g=2,random(3..11#2),g=3,random(2,4,5,7,8,10,11),g=4,random(3,5,7,9,11),g=5, random(2,3,4,6,7,8,9,11),g=6,random(5,7,11),g=7,random(2,3,4,5,6,8,9,10,11),g=8,random(3,5,7,9,11),g=9,random(2,4,5,7,8,10,11),g=10,random(3,7,9),g=11,random(2..10),g=12,random(5,7,11))", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}, "action1": {"definition": "if(s1<0,'taking away', 'adding')", "templateType": "anything", "group": "Ungrouped variables", "name": "action1", "description": ""}, "action": {"definition": "if(s1<0,'Taking away', 'Adding')", "templateType": "anything", "group": "Ungrouped variables", "name": "action", "description": ""}}, "metadata": {"description": "Add/subtract fractions and reduce to lowest form.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}], "resources": []}]}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}