// Numbas version: exam_results_page_options {"name": "W2a: Simplifying fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"f": {"group": "Ungrouped variables", "name": "f", "definition": "switch(g=2,random(3..7#2),g=3,random(2,4,5),g=4,random(3,5),g=5, random(2,3,4),g=6,random(5,7),g=7,random(2,3,4),g=8,random(3,5,7),g=9,random(2,4,5),g=10,random(3,7),g=11,random(2..5))", "description": "", "templateType": "anything"}, "s1": {"group": "Ungrouped variables", "name": "s1", "definition": "if(abs(a*f+s*b*g)=1,-s,s)", "description": "", "templateType": "anything"}, "a": {"group": "Ungrouped variables", "name": "a", "definition": "random(2..7)", "description": "", "templateType": "anything"}, "b": {"group": "Ungrouped variables", "name": "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..5),f=8,random(1,3,5),f=9,random(1,2,4,5),f=10,random(1,3),f=11,random(1..5))", "description": "", "templateType": "anything"}, "test": {"group": "Ungrouped variables", "name": "test", "definition": "a*f+s1*b*g", "description": "", "templateType": "anything"}, "s": {"group": "Ungrouped variables", "name": "s", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "g": {"group": "Ungrouped variables", "name": "g", "definition": "switch(a=1, random(2..7),a=2,random(3..7#2),a=3,random(4,5,7),a=4,random(5,7),a=5, random(6,7,8),a=6,random(7,11),a=7,random(8,9))", "description": "", "templateType": "anything"}}, "name": "W2a: Simplifying fractions", "advice": "

We have:
\\[\\simplify[std]{{g} / ({a} + {s1} * ({b * g} / {f})) = {g} / (({a} * {f} + {s1} * {b * g}) / {f}) ={g} / (({a * f + s1 * b * g}) / {f})= ({f}*{g}) / ({a * f + s1 * b * g}) = ({g * f} / {(a * f + s1 * b * g)})}\\]
Here we use the result that dividing by a fraction $\\frac{a}{b}$ is the same as multiplying by $\\frac{b}{a}$.
The resulting fraction is in lowest form i.e. the top and bottom do not have a common factor.

", "variablesTest": {"maxRuns": 100, "condition": ""}, "extensions": [], "preamble": {"js": "", "css": ""}, "variable_groups": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find $\\displaystyle \\frac{a} {b + \\frac{c}{d}}$ as a single fraction in the form $\\displaystyle \\frac{p}{q}$ for integers $p$ and $q$.

"}, "statement": "

Write the following expression as a single fraction in its lowest form:

", "parts": [{"variableReplacements": [], "useCustomName": false, "showCorrectAnswer": true, "gaps": [{"vsetRangePoints": 5, "variableReplacements": [], "useCustomName": false, "type": "jme", "showPreview": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "customName": "", "checkingType": "absdiff", "unitTests": [], "notallowed": {"strings": ["+", ".", "(", ")", "1-", "2-", "3-", "4-", "5-", "6-", "7-", "8-", "9-"], "message": "

You must write your answer in the form p/q for integers p and q

", "showStrings": false, "partialCredit": 0}, "showFeedbackIcon": true, "valuegenerators": [], "checkVariableNames": false, "musthave": {"strings": ["/"], "message": "

You must write your answer in the form p/q for integers p and q

", "showStrings": false, "partialCredit": 0}, "showCorrectAnswer": true, "checkingAccuracy": 0.0001, "answer": "{g*f}/{a*f+s1*b*g}", "answerSimplification": "std", "failureRate": 1, "marks": 1, "vsetRange": [0, 1], "maxlength": {"message": "

answer too long

", "length": 7, "partialCredit": 0}, "adaptiveMarkingPenalty": 0, "scripts": {}, "variableReplacementStrategy": "originalfirst"}], "extendBaseMarkingAlgorithm": true, "type": "gapfill", "sortAnswers": false, "customMarkingAlgorithm": "", "customName": "", "prompt": "

\\[\\simplify{{g} / ({a} + {s1} * ({b * g} / {f}))}\\]
Input your answer here: [[0]]

\n

Your answer must be of the form a/b for suitable integers a and b. No decimal numbers allowed.

\n

Do not include brackets in your answer.

", "unitTests": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "scripts": {}}], "ungrouped_variables": ["a", "b", "g", "f", "s1", "s", "test"], "tags": [], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"]}, "functions": {}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Timur Zaripov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Timur Zaripov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/"}]}